8000 bug: ssr, scoped components not processing slotted nodes appropriately · Issue #6313 · stenciljs/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
bug: ssr, scoped components not processing slotted nodes appropriately #6313
@johnjenkins

Description

@johnjenkins

Prerequisites

Stencil Version

latest

Current Behavior

scoped: true components do not render properly within a shadow: true component that is rendered with serializeShadowRoot: 'scoped'.

  1. nodes are not slotted properly. In the linked demo a shadow: true component forwards it's <slot /> into a scoped: true component. The slot gets hidden. The scoped components childNodes are 0. The content collapses.
  2. there's a noticeable style 'flicker' as the components hydrate. This is due to the scoped component's nodes being moved into the shadowRoot but the styles being left behind in the document head.

Expected Behavior

  1. slotted nodes should work in a scoped component.
  2. no style flicker.

System Info

Steps to Reproduce

pnpm i
pnpm build
pnpm express

Code Reproduction URL

https://github.com/johnjenkins/stencil-start-m6opf9rg/tree/collapsing-scoped-components

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0