feat(runtime): add extras flag for scoped slot changes #5220
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the current behavior?
We made changes in #5146 and #5135 to alter the behavior of
slot
s inside scoped components. The changes aligned Stencil's slot polyfill with behavior in the native shadow DOM and were placed behind theexperimentalSlotFixes
extra flag in a project's Stencil config. However, these changes negatively impacted the Ionic Framework causing automated tests to fail.GitHub Issue Number: N/A
What is the new behavior?
This commit adds a new extras flag,
experimentalScopedSlotChanges
, that is used to change logic in a few places to align Stencil'sscoped
encapsulation to work more like the native Shadow DOM when using slots.Changes in #5146 and #5135 are changed from being gated by the
experimentalSlotFixes
flag to this new flag so they can be toggled independently.Does this introduce a breaking change?
This will be considered a breaking change once we remove the ability to opt-in/opt-out
Testing
Manual tests
Changes can be tested by enabling
experimentalScopedSlotChanges
in a starter project's Stencil config and following the test cases from either #5146 and/or #5135Automated tests
Stencil unit and e2e tests continue to pass (with the new flag enabled). Ionic Framework screenshot tests pass with the flag disabled (expected).
Other information
We'll need to coordinate with the Framework team to update their components before we can enable this flag by default (and eventually remove it altogether).
Related doc changes: stenciljs/site#1307