Skip to content

fix(overlays): assign incremental id to overlay host - #27278

Merged
sean-perkins merged 12 commits into
mainfrom
FW-2663
May 3, 2023
Merged

sean-perkins merged 12 commits into
mainfrom
FW-2663

Conversation

@sean-perkins

Copy link
Copy Markdown
Contributor

Issue number: Internal


What is the current behavior?

The counter for incrementing the id and z-index of an overlay is incremented whenever the connectedCallback is fired for an overlay.

When an overlay is presented and/or conditionally rendered, the overlay id can increment by n+2 instead of n+1.

What is the new behavior?

  • Increments all overlay ids consistently
  • Removes legacy ion-modal-{id} and ion-popover-{id} logic
  • Adds unit tests for the id behavior
    • Tests are split up into separate files so that the counter is always starting from 0
  • Adds an integration test with the Angular test app to verify conditional rendering behavior

Does this introduce a breaking change?

  • Yes
  • No

Other information

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions Bot added package: angular @ionic/angular package package: core @ionic/core package labels Apr 26, 2023

@sean-perkins sean-perkins left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if anyone else feels like a fixture would be useful here for the repeat overlay tests.

@sean-perkins
sean-perkins marked this pull request as ready for review May 2, 2023 02:23
@sean-perkins
sean-perkins requested a review from a team as a code owner May 2, 2023 02:23

@liamdebeasi liamdebeasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go after the two comments are addressed.

Comment thread core/src/utils/overlays.ts Resolved
Comment thread angular/test/base/e2e/src/modal.spec.ts Resolved
@sean-perkins
sean-perkins added this pull request to the merge queue May 3, 2023
Merged via the queue into main with commit 9313a91 May 3, 2023
@sean-perkins
sean-perkins deleted the FW-2663 branch May 3, 2023 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants