Add Theme Preview as an official bb plugin - #2505
Merged
Merged
Conversation
Theme Preview moves from the external bb-plugins repo into bb as a built-in so it evolves with the product instead of being a second design-system implementation. What it is: a panel that renders a maintained fixture of the bb UI under the live theme, so a palette can be judged against real product composition and against isolated specimens. Structure follows an explicit four-area taxonomy (taxonomy.ts), which both the app and the coverage tests read: - Preview: a fluid mock of the bb window with view toggles. Components keep their natural size and panels join or leave the composition by width; nothing is scaled. - Style sheet: the foundation surfaces lead, followed by the derived families, typography and corner radius. Every entry is one addressable `data-tp-specimen` element so a later version can attach editors. - Components: live bb controls covering hover, focus, checked, disabled. - Overlays: menu, dialog, popover, tooltip, hover card, toast, plus an interactive thread list, opened deliberately one at a time. Every control is a vendored @bb/shared-ui component rather than a lookalike, so the preview inherits bb's real geometry and behaviour. Colour values and contrast ratios are measured from the running document at runtime; status ratios measure the pair the product actually paints (text token over its 15%/18% wash), not the raw token on canvas. fixture-anatomy.test.ts pins the fixture to the app source it mirrors, so renaming a token or class the preview paints fails these tests instead of silently drifting. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…vzn6tvjyr' into bb/theme-preview-builtin-thr_bvzn6tvjyr # Conflicts: # apps/app/src/lib/themes/index.ts # packages/domain/src/app-theme.ts # plugins/theme-preview/app.test.tsx # plugins/theme-preview/app.tsx # plugins/theme-preview/taxonomy.ts
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.
Purpose
Theme Preview is a companion for agent-authored themes. Keep it open beside the agent thread while creating or updating a theme to see the impact across representative bb screens, components, overlays, and style tokens in one place.
It ships with bb as an optional BB Official plugin. Users install it from Extensions when they need it; it is not installed automatically.
What it includes
Theme Preview does not edit or write theme files. Contrast checks cover representative pairings, not a complete accessibility audit.
Screenshots
Before
Optional installation
After installation
Verification
7067aa886e205f4872799a6e33f39b667738a008BB-Thread-ID: thr_b2mmedy33p