Skip to content

Conversation

@liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Jun 28, 2022

Docs: ionic-team/ionic-docs#2432

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?

Issue URL: Internal ticket.

What is the new behavior?

  • Adds the ability to have inline modals and popovers automatically mount their inner contents on creation. The contents will only be unmounted when the parent modal/popover is unmounted. Re-mounting the inner modal/popover does not preserve the inner content state.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot added package: angular @ionic/angular package package: core @ionic/core package package: react @ionic/react package package: vue @ionic/vue package labels Jun 28, 2022
@liamdebeasi
Copy link
Contributor Author

liamdebeasi commented Jun 29, 2022

Bikeshedding a bit... I'm not a huge fan of autoMountComponent. Some alternatives:

  • keepMounted
  • autoMount
  • keepComponentMounted

Anyone have a preference? keepMounted is what MUI calls it (https://mui.com/material-ui/react-modal/#performance), but I worry that it implies that we will keep ion-modal mounted.


I added reviewers to get feedback on the prop name. The code itself is the same code that was already reviewed.

@liamdebeasi liamdebeasi marked this pull request as ready for review June 29, 2022 13:40
@liamdebeasi liamdebeasi requested review from a team, averyjohnston and sean-perkins and removed request for a team June 29, 2022 13:40
@averyjohnston
Copy link
Contributor

Maybe keepContentsMounted? It's similar to the existing keepMounted API, but it makes it more clear what exactly we're mounting.

Copy link
Contributor

@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.

Minor suggestions. Unsure how much of the language should be around the prop name vs. the behavior of the feature. I do not have any strong opinions on either.

@liamdebeasi liamdebeasi requested a review from sean-perkins July 1, 2022 16:04
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 package: react @ionic/react package package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants