docs(swingset): document headless primitives#8819
Conversation
Replace the per-story knob sub-pages with one overview page per component. The interactive playground now lives inline in the MDX overview, with shared per-page state (PlaygroundContext) driving a live <Preview> whose props are edited through controls embedded in the <PropTable> Value column. Design-token overrides move into a VariablesPanel attached to the preview, the sidebar is flattened to a single link per component under section labels, and each page gains a GitHub 'View source' link and a generated Usage snippet derived from the story source. Docs (CLAUDE.md, README) updated to match.
The whole-codeblock <div onClick> tripped jsx-a11y/click-events-have-key-events and no-static-element-interactions, failing 'next build'. The accessible Copy button already covers the copy action, so remove the div handler (and its now misleading cursor-pointer).
Add single-page overviews for the remaining @clerk/headless primitives (accordion, autocomplete, dialog, menu, popover, select, tabs, tooltip), mirroring the existing Collapsible page: an unstyled `<Story>` demo plus Parts/Props/Styling tables sourced from each primitive's parts. Wired into the sidebar registry and the DocsViewer MDX map.
🦋 Changeset detectedLatest commit: 7462024 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (19)
Disabled knowledge base sources:
📝 WalkthroughWalkthroughThis PR extends Swingset's documentation and story library with comprehensive interactive guides and Storybook demos for eight headless UI primitives (accordion, autocomplete, dialog, menu, popover, select, tabs, tooltip), wiring them into the core module registry and dynamic documentation viewer. ChangesHeadless primitives documentation and story expansion
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
Comment |
…itives-to-swingset # Conflicts: # packages/swingset/src/lib/registry.ts
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
TLDR
Documents the rest of the "primitives":
Description
Builds out the
@clerk/swingsetcomponent explorer for the Mosaic/headless system. Documents every remaining@clerk/headlessprimitive (accordion, autocomplete, dialog, menu, popover, select, tabs, tooltip) as single-page overviews — each with an unstyled<Story>demo plus Parts/Props/Styling tables sourced directly from the primitive's parts — mirroring the existing Collapsible page, and wires them into the sidebar registry and the DocsViewer MDX map. Also includes the earlier inline-playground work this branch is stacked on: single-page component overviews with a live<Preview>+ interactive<PropTable>knobs, plus an a11y lint fix dropping a redundant click-to-copy handler. To test:pnpm run dev:swingsetand visit each/components/<primitive>page to confirm the docs render and the demos are interactive.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
New Features
Documentation