Skip to content

Add Color Swatches plugin - #76

Open
brsbl wants to merge 1 commit into
bb/theme-preview-thr_tkwwfu5nasfrom
bb/color-swatches-thr_tkwwfu5nas
Open

Add Color Swatches plugin#76
brsbl wants to merge 1 commit into
bb/theme-preview-thr_tkwwfu5nasfrom
bb/color-swatches-thr_tkwwfu5nas

Conversation

@brsbl

@brsbl brsbl commented Aug 21, 2026

Copy link
Copy Markdown
Owner

What changed

This adds Color Swatches, a frontend content script that decorates color literals in thread timelines with IDE-style chips. It recognizes valid hex colors and modern CSS color functions, validates matches through CSS.supports, shows alpha over a checkerboard, and excludes editable composer surfaces.

The implementation does not split or wrap React-owned text nodes. It annotates an existing token boundary and draws the chip with ::before, preserving streaming updates, selection, and copied text.

The plugin builds against the released @get-bb/plugin-sdk 0.4.8 package while retaining engines.bbPluginSdk: ^0.4.1 and engines.bb: >=0.0.34.

Verification

  • npm run check --workspace=bb-plugin-color-swatches
  • node tooling/check-repository.mjs
  • Fixture content script reports 0 swatches on the parent and 13 on this branch
  • Mobile, narrow, normal, and ultrawide captures with the same first color block held at the same viewport position

Evidence

Before — parent branch without timeline swatches

Before — color literals only

After — this branch with IDE-style swatches

After — color swatches

Full visual evidence

BB-Thread-ID: thr_tkwwfu5nas

@brsbl
brsbl force-pushed the bb/color-swatches-thr_tkwwfu5nas branch from 8e5b986 to f452c3b Compare August 21, 2026 08:37
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