Skip to content

docs(app): extract playground button into shared component#78

Merged
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-50764049
Jun 10, 2026
Merged

docs(app): extract playground button into shared component#78
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-50764049

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Live sync — next commit in queue

Upstream: 50764049 — docs(app): extract playground button into shared component

Immediate next commit after b597f909 (#77) in the oldest-first queue.

What & why

Docs-site DRY refactor. The "Open in playground" button was duplicated in ComponentCode.vue and ComponentExample.vue. Extracted it into a shared, auto-imported docs/app/components/content/ComponentPlaygroundButton.vue and replaced both inline blocks with:

<ComponentPlaygroundButton v-if="playgroundUrl" :to="playgroundUrl" :component="camelName" source="code|example" />

Removed the now-unused PlayLIcon import and const { track } = useAnalytics() from both files.

b24ui divergences (vs upstream)

  • Components/icon: B24Tooltip / B24Button / PlayLIcon (upstream uses UTooltip / UButton / i-lucide-play).
  • Kept the source field ('code' / 'example') in the track('Playground Opened', …) event via a source prop. b24ui tracked it before this commit, so dropping it (as upstream did) would have regressed analytics granularity.
  • Adopted upstream's new tabindex="-1" on the button.

Docs-app only — no src/ (library) change.

Ledger (per-port maintenance, #75 §1)

  • .sync/nuxt-ui.json: cursor50764049; previous b597f909 entry finalized (pr: 77, b24ui_sha: 91c397fd).
  • .sync/log/50764049….md: decision record.

Validation (linux verify script; windows .ps1 below in chat)

  • dev:prepare · ✅ eslint (3 files) · ✅ nuxt typecheck docs
  • ✅ full pnpm exec vitest run (no -u) 4892 passed | 6 skipped (library suite unaffected by docs change — run for the record)

https://claude.ai/code/session_01Qz7EXMncvEGiCj4WbmYgJo


Generated by Claude Code

Port of nuxt/ui 50764049. Extracts the duplicated "Open in playground"
button from ComponentCode.vue and ComponentExample.vue into a shared
docs/app/components/content/ComponentPlaygroundButton.vue (auto-imported),
adapted to b24ui (B24Tooltip/B24Button/PlayLIcon). Keeps the `source`
analytics field via a prop to preserve b24ui tracking granularity; adopts
upstream's tabindex="-1".

Ledger: cursor -> 50764049; b597f909 entry finalized (pr #77, 91c397f).

Upstream: 507640490f5d01ff2c9d84d19421cc06a2b2aaec
@IgorShevchik IgorShevchik merged commit a27ff2d into main Jun 10, 2026
1 check passed
@IgorShevchik IgorShevchik deleted the sync/nuxt-50764049 branch June 10, 2026 10:06
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