Skip to content

fix(runtime): only patch non-shadow components with <slot>s#6348

Merged
christian-bromann merged 2 commits intomainfrom
fix-only-path-slot-cmps
Jul 17, 2025
Merged

fix(runtime): only patch non-shadow components with <slot>s#6348
christian-bromann merged 2 commits intomainfrom
fix-only-path-slot-cmps

Conversation

@johnjenkins
Copy link
Copy Markdown
Contributor

@johnjenkins johnjenkins commented Jul 17, 2025

What is the current behavior?

The new behaviour introduced by https://github.com/stenciljs/core/pull/6314/files means that non-shadow components without <slot>s are now patched.

This means components which are purely used as style tags e.g.:

// plain-component.ts

import { Component } from '@stencil/core';

@Component({
  tag: 'plain-component',
  styleUrl: 'plain-component.scss',
})
export class PlainComponent {}

Used like:

<plain-component>
  <div>something</div>
</plain-component>

And queried like document.querySelector('plain-component').childNodes() returns an empty array.

GitHub Issue Number: N/A

What is the new behavior?

Only non-child component with slots are patched. Components that don't need the patches are left alone.

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

Other information

@johnjenkins johnjenkins requested a review from a team as a code owner July 17, 2025 22:02
@johnjenkins
Copy link
Copy Markdown
Contributor Author

not sure if something needs updating in the CI here. Edge image location has changed? actions/runner-images#12597

@christian-bromann
Copy link
Copy Markdown
Member

Edge image location has changed?

Yes, unfortunately updating WebdriverIO that has a fix won't work due to other issues. I will disable Edge for now.

Copy link
Copy Markdown
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@christian-bromann christian-bromann merged commit 827b7f0 into main Jul 17, 2025
205 of 210 checks passed
@christian-bromann christian-bromann deleted the fix-only-path-slot-cmps branch July 17, 2025 22:56
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.

2 participants