Skip to content

feat(sidepanel): Arc-style saturated Space tint + auto palette swap - #78

Merged
Matuyuhi merged 1 commit into
mainfrom
feat/space-tint-arc-style
May 13, 2026
Merged

Matuyuhi merged 1 commit into
mainfrom
feat/space-tint-arc-style

Conversation

@Matuyuhi

Copy link
Copy Markdown
Owner

Summary

  • Repainted the Space tint so the side panel reads as Arc's saturated-sidebar style (opaque muted color across the whole body, white text, frosted-white pills) instead of the previous near-invisible pastel overlay on the user's prefers-color-scheme.
  • Fixed the bug where a freshly-created Space rendered its content but didn't apply the tint until the user clicked its pill — activeColor now mirrors the same activeId ?? spaces[0] fallback the render path uses.
  • Added a Storybook entry (Theme/SpaceTint) so hue/lightness tuning doesn't require reloading the extension.

How it works

  1. theme.ts COLOR_GRADIENT — opaque saturated gradient per color (muted to keep white text readable; grey stays translucent because the palette isn't swapped for it).
  2. globalStyles.tsx — html[data-space-tint]:not([data-space-tint='grey']) flips the palette:
    • --fg / --muted / --subtle / --border → #fff and rgba(white, …)
    • --bg-soft / --bg-hover / --bg-active → rgba(white, …) (frosted pills/buttons)
    • --bg → opaque #15171c so menus/popovers stay legible over the saturated body
  3. App.tsx writes both --space-tint (body bg-image) and data-space-tint (html attribute) in a single useEffect.

Test plan

  • bun run build passes
  • bun run storybook → Theme / SpaceTint → each color story renders the saturated body with white text and frosted pills; AllColors swatches match
  • Load unpacked dist/ and:
    • Create the very first Space — tint applies immediately (no pill click needed)
    • Switch between Spaces of different colors — body color updates, no flash of the previous palette
    • Open SpaceMenu / FolderMenu / TabMenu — menu surface stays dark/opaque and text stays legible over the saturated body
    • Change a Space's color from the menu — tint updates without reopening the panel
    • Select grey — panel reverts to the OS prefers-color-scheme (light or dark) instead of forcing the tinted palette

🤖 Generated with Claude Code

- COLOR_GRADIENT: saturated, opaque (was translucent pastel) — body
  reads as the space's color the way Arc's sidebar does. Muted hues
  (e.g. #6886c1 → #4f6aa3 for blue) so white text stays readable
  without feeling neon. grey keeps a subtle translucent overlay since
  the palette isn't swapped for it.
- globalStyles: when html has data-space-tint != grey, override the
  palette to white-on-color: --fg=#fff, --muted/--subtle/--border/
  --bg-soft/-hover/-active become rgba(white, …) for the frosted pill
  look, while --bg flips to opaque #15171c so menus/popovers stay
  legible when they float over the saturated body.
- App.tsx: derive activeColor with the same activeId ?? spaces[0]
  fallback the render uses. Without this, a freshly-created Space —
  which doesn't call switchTo and so leaves activeSpaceByWindow alone
  — would render its content but never apply the tint until the user
  clicked its pill. Also writes data-space-tint on <html> so the
  palette swap kicks in.
- SpaceTint.stories.tsx (new): Theme/SpaceTint with per-color stories
  + an AllColors swatch grid for tuning hues from Storybook without
  reloading the extension.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Matuyuhi
Matuyuhi merged commit 3dfbe75 into main May 13, 2026
1 check passed
@Matuyuhi
Matuyuhi deleted the feat/space-tint-arc-style branch May 13, 2026 03:19
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