Skip to content

fix(runtime): non-shadow slot forwarding fixes - #6816

Merged
johnjenkins merged 4 commits into
v5from
v5-non-shadow-slot-forwarding-fixes
Aug 9, 2026
Merged

fix(runtime): non-shadow slot forwarding fixes#6816
johnjenkins merged 4 commits into
v5from
v5-non-shadow-slot-forwarding-fixes

Conversation

@johnjenkins

@johnjenkins johnjenkins commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What is the current behavior?

GitHub Issue Number: #6770

What is the new behavior?

Fixes #6770

Tackling this issue raised lots of rough edges around non-shadow <slot> forwarding - all of which lead to unexpected / non-native behaviour.

slot forwarding logic revolved around corresponding name attributes.. i.e.

cmp-a > slot name=a
  cmp-b  > slot name=a

cmp-a's slot would try be forwarded to cmp-b's slot (and dynamically fail as per the linked issue).
This is incorrect - cmp-a's slot must also have a corresponding slot to forward.. otherwise it should go to the default slot, or be hidden if there is no default slot.

This PR roles in a number of small fixes to better align slot forwarding to the spec with 3 scenarios tested for:

  1. named slot forwarding to corresponding named slot
  2. named slot forwarding to default slot
  3. named slot having no slot to forward to and so hiding

This was tested for and fixed for initial hydration and dynamic insertion and removal

Tested against the linked repro

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Strictly not, but if users were relying on the broken behaviour then it could be perceived as breaking ... so I'm going to roll into v5

Testing

Other information

@johnjenkins
johnjenkins requested a review from a team as a code owner August 8, 2026 23:12
@johnjenkins
johnjenkins merged commit ae04a11 into v5 Aug 9, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant