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): presenting an overlay does not create nested elements #26154

Merged
merged 10 commits into from
Nov 2, 2022

Conversation

sean-perkins
Copy link
Contributor

@sean-perkins sean-perkins commented Oct 19, 2022

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

When overlays are presented without a user defined component, the overlay will continue to create elements at the root of the overlay and append the contents of the teleported component inside of it. This results in scenarios where in implementations like ion-datetime-button with an ion-modal, the ion-modal will create a nested DOM tree of .ion-page elements.

Issue URL: #26117

What is the new behavior?

  • Inline overlays do not create nested root nodes from the delegate
  • DatetimeButton with a modal does not create nested .ion-page elements

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev-build: 6.3.3-dev.11666207854.1e96b6a8

This is the same fix that we landed on for this feature: #26153, but since that is targeted for v7, it would be great to resolve this specific bug for v6.

@github-actions github-actions bot added the package: core @ionic/core package label Oct 19, 2022
@sean-perkins
Copy link
Contributor Author

Should we be reflecting the presentation instead of evaluating the property value, like we are doing in this flaky test: https://github.com/ionic-team/ionic-framework/blob/main/core/src/components/datetime-button/test/basic/datetime-button.e2e.ts#L23-L29?

@sean-perkins sean-perkins marked this pull request as ready for review October 20, 2022 19:26
@sean-perkins sean-perkins requested a review from a team as a code owner October 20, 2022 19:26
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.

Great job!

core/src/utils/framework-delegate.ts Outdated Show resolved Hide resolved
core/src/components/modal/test/inline/modal.e2e.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants