docs(app): extract playground button into shared component#78
Merged
Conversation
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
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.
Live sync — next commit in queue
Upstream:
50764049— docs(app): extract playground button into shared componentImmediate 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.vueandComponentExample.vue. Extracted it into a shared, auto-importeddocs/app/components/content/ComponentPlaygroundButton.vueand replaced both inline blocks with:Removed the now-unused
PlayLIconimport andconst { track } = useAnalytics()from both files.b24ui divergences (vs upstream)
B24Tooltip/B24Button/PlayLIcon(upstream usesUTooltip/UButton/i-lucide-play).sourcefield ('code'/'example') in thetrack('Playground Opened', …)event via asourceprop. b24ui tracked it before this commit, so dropping it (as upstream did) would have regressed analytics granularity.tabindex="-1"on the button.Docs-app only — no
src/(library) change.Ledger (per-port maintenance, #75 §1)
.sync/nuxt-ui.json:cursor→50764049; previousb597f909entry 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 docspnpm 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