Repository navigation
fix(docs): include exportparts in component parts - #7047
Merged
Merged
Conversation
1 of 2 tasks
marcomattes
force-pushed
the
feat/docs-exportparts
branch
from
November 26, 2026 12:54
d06b3e0 to
2e60e80
Compare
`part` on `<Host>` styles the host from the parent's scope, so it is not one of this component's parts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
exportparts in component parts
johnjenkins
enabled auto-merge (squash)
November 26, 2026 23:53
johnjenkins
added a commit
that referenced
this pull request
Nov 27, 2026
* fix(docs): include exportparts in component parts * fix(docs): ignore part on Host and share part/exportparts parsing `part` on `<Host>` styles the host from the parent's scope, so it is not one of this component's parts. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: John Jenkins <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Stencil infers a component's CSS parts from
part="…"inrender(), but ignoresexportparts. Parts forwarded from a child element therefore never show up in docs-json, the readme, or the Custom Elements ManifestcssParts, unless they are documented by hand with@part.GitHub Issue Number: N/A
What is the new behavior?
gatherVdomMetanow also readsexportpartsand adds the outward-facing part names tohtmlParts, which already feeds docs-json, readme and CEMcssParts:label→labelicon: btn-icon→btn-icon(the name consumers style with::part())part.exportpartson<Host>is ignored: it re-exports this component's own parts into its parent's scope and is not part of this component's API.Descriptions still come from
@partJSDoc tags (merged by name as before).Documentation
N/A
Does this introduce a breaking change?
Testing
Added unit tests to
src/compiler/transformers/test/parse-vdom.spec.ts(outward-facing names incl. mappings and whitespace,<Host>ignored, dynamic value skipped). The first two fail without the change.npx jest src/compiler/transformers/test/parse-vdom.spec.ts src/compiler/docs: passed, 127 testsnpm run build: passedeslint/prettier --check/cspellon the changed files: passedOther information
N/A