Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 12 commits into from
May 3, 2023
Merged

Conversation

sean-perkins
Copy link
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

@stackblitz
Copy link

stackblitz bot commented Apr 26, 2023

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
Copy link
Contributor Author

@sean-perkins sean-perkins left a comment

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
Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

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.

core/src/utils/overlays.ts Show resolved Hide resolved
angular/test/base/e2e/src/modal.spec.ts Outdated Show resolved Hide 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