Skip to content

feat: simplify non-shadow <slot> logic pt1#6726

Draft
johnjenkins wants to merge 3 commits into
v5from
feat-non-shadow-slot-simplification
Draft

feat: simplify non-shadow <slot> logic pt1#6726
johnjenkins wants to merge 3 commits into
v5from
feat-non-shadow-slot-simplification

Conversation

@johnjenkins
Copy link
Copy Markdown
Contributor

@johnjenkins johnjenkins commented May 19, 2026

What is the current behavior?

GitHub Issue Number: N/A

What is the new behavior?

Swaps out #textNode markers in lightDOM components with actual <slot> nodes, enabling a number of runtime and Dev-QoL improvements:

  • all patched / polyfilled methods shrink as finding slot children is much easier: textNode ~ sibling nodes + checks becomes querySelector*
  • the viewable source === the actual source of truth
  • showing / hiding fallback nodes becomes trivial, changes from: render? Loop through all slotted nodes and do checks to slot:not(:empty) + slot-fb { display: none; }
  • builds which include SSR + lightDOM components shrink by up to 4kb

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Any test snapshots will now have <slot> nodes rendered

Testing

Other information

@johnjenkins johnjenkins requested a review from a team as a code owner May 19, 2026 22:33
@johnjenkins johnjenkins marked this pull request as draft May 19, 2026 23:45
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