Skip to content

Add Theme Preview as an official bb plugin - #2505

Merged
brsbl merged 23 commits into
mainfrom
bb/theme-preview-builtin-thr_bvzn6tvjyr
Sep 1, 2026
Merged

Add Theme Preview as an official bb plugin#2505
brsbl merged 23 commits into
mainfrom
bb/theme-preview-builtin-thr_bvzn6tvjyr

Conversation

@brsbl

@brsbl brsbl commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

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

  • Thread, New thread, Split, and Settings views built from bb UI patterns
  • Interactive component and overlay specimens
  • Theme and light/dark switching for comparison
  • A read-only style sheet covering colors, typography, rhythm, radius, shadow, and representative contrast pairings
  • Automatic refresh when the active theme changes

Theme Preview does not edit or write theme files. Contrast checks cover representative pairings, not a complete accessibility audit.

Screenshots

Before

Before: bb Extensions catalog without Theme Preview

Optional installation

Theme Preview listed as an uninstalled BB Official plugin

After installation

Read-only Theme Preview with Catppuccin

Verification

  • Exact head: 7067aa886e205f4872799a6e33f39b667738a008
  • Remote CI passes, including Theme Preview's 74-test package suite and Linux/macOS package smokes
  • Chrome for Testing 152.0.7977.75 on Linux at 1600×1050
  • Confirmed the uninstalled BB Official listing, explicit install confirmation, catalog provenance, running plugin, and rendered Theme Preview panel

BB-Thread-ID: thr_b2mmedy33p

AGENT GENERATED

brsbl and others added 5 commits August 26, 2026 13:54
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>
@brsbl brsbl changed the title Add Theme Preview as a built-in plugin Add interactive Theme Preview as a built-in plugin Aug 29, 2026
@brsbl brsbl changed the title Add interactive Theme Preview as a built-in plugin Add Theme Preview as an official bb plugin Sep 1, 2026
@brsbl
brsbl merged commit 994a891 into main Sep 1, 2026
24 of 25 checks passed
@brsbl
brsbl deleted the bb/theme-preview-builtin-thr_bvzn6tvjyr branch September 1, 2026 22:53
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.

1 participant