Manifest Debugger: stable deep-link anchors so tooling can link to a specific component #35469
rachelslurs
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
In components.html, each component card (
<article class="card">) has no id attribute — the only per-card identifiers are numeric-index-based slugs (c-0-…, c-1-…) used internally for the CSS toggles, and those shift whenever components are added, removed, or renamed (cards are name-sorted). So there's no stable anchor to link to: an addon or tool that reads a component id from components.json cannot open components.html#example-button and land on that component. Anyone wanting to point a teammate (or an agent) at a specific component in the debugger has to scroll and search manually.Describe the solution you'd like
Give each component card a stable id equal to its manifest id, the same value that keys components.json, so components.html# scrolls to (and highlights) that component's card.
Because the JSON manifest and the HTML debugger are generated from the same index in the same module, anchoring the card by the manifest id makes the anchor-to-id mapping guaranteed consistent. That's the key property: tooling can deep-link deterministically from a components.json entry straight to its section in the debugger.
Details, scoped to the debugger renderer:
Describe alternatives you've considered
Are you able to assist to bring the feature to reality?
yes, I can
Additional context
I have a working implementation scoped to the debugger renderer (code/core/src/core-server/utils/manifests/render-components-manifest.ts) with tests, and verified in a browser that deep-linking scrolls to and highlights the target card while the props/stories toggles and #filter-* filters continue to work.
All reactions