-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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(core): add slot
elements to scoped "wrapper" components
#29074
fix(core): add slot
elements to scoped "wrapper" components
#29074
Conversation
This commit adds an explicit `slot` tag to components in core leveraging "scoped" encapsulation with no rendered content (i.e. elements with only a `Host` tag and styles). Previously, Stencil would allow content to project through to a component even when a slot was not present. However, with the changes in `extras.experimentalScopedSlotChanges`, this behavior was changed to hide elements without a destination slot - matching the behavior of a shadow encapsulated component.
slot
elements to scoped "wrapper" elementsslot
elements to scoped "wrapper" components
@tanner-reits should we just merge this into the current target (my branch) and update my PR? Alternatively, I think you should be able to cherry-pick my commit onto your PR now that you have write permissions. Either way, I think that'll help give the Framework team a little more context as to what we're doing/that we're targeting a feature branch for both of our changes here. WDYT? |
@rwaskiewicz I'll go ahead and merge this (don't know why I didn't do that earlier) |
ea211de
into
ionic-team:rwaskiewicz/enable-experimental-slot-fixes
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Previously, Stencil would allow content to project through to a component even when a slot was not present. However, with the changes in `extras.experimentalScopedSlotChanges`, this behavior was changed to hide elements without a destination slot - matching the behavior of a shadow encapsulated component. As such, elements projected through the `ion-label` or `ion-buttons` components would no longer be visible in rendered output. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> This commit adds an explicit `slot` tag to components in core leveraging "scoped" encapsulation with no rendered content (i.e. elements with only a `Host` tag and styles). ## Does this introduce a breaking change? - [ ] Yes - [X] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Previously, Stencil would allow content to project through to a component even when a slot was not present. However, with the changes in `extras.experimentalScopedSlotChanges`, this behavior was changed to hide elements without a destination slot - matching the behavior of a shadow encapsulated component. As such, elements projected through the `ion-label` or `ion-buttons` components would no longer be visible in rendered output. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> This commit adds an explicit `slot` tag to components in core leveraging "scoped" encapsulation with no rendered content (i.e. elements with only a `Host` tag and styles). ## Does this introduce a breaking change? - [ ] Yes - [X] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
Issue number: N/A
What is the current behavior?
Previously, Stencil would allow content to project through to a component even when a slot was not present. However, with the changes in
extras.experimentalScopedSlotChanges
, this behavior was changed to hide elements without a destination slot - matching the behavior of a shadow encapsulated component.As such, elements projected through the
ion-label
orion-buttons
components would no longer be visible in rendered output.What is the new behavior?
This commit adds an explicit
slot
tag to components in core leveraging "scoped" encapsulation with no rendered content (i.e. elements with only aHost
tag and styles).Does this introduce a breaking change?
Other information