Skip to content

fix(banner): key the announcement bar CTA to the app theme - #6675

Merged
tsahimatsliah merged 2 commits into
mainfrom
claude/announcement-bar-cta-theme
Sep 17, 2026
Merged

tsahimatsliah merged 2 commits into
mainfrom
claude/announcement-bar-cta-theme

Conversation

@tsahimatsliah

@tsahimatsliah tsahimatsliah commented Sep 16, 2026

Copy link
Copy Markdown
Member

Changes

Follow-up to #6672, which picked the CTA from the bar's ink (pale bar → dark button, deep bar → white). The product call is:

  • Dark mode: white primary button on every bar, except the white bar (white-pepper) and salt, which get the black one.
  • Light mode: the button matches the bar's text. White on the bars whose text is white (cabbage-onion, cabbage, onion, water, ketchup, burger, white-pepper, salt); dark on the pale bars whose text is dark (avocado, blue-cheese, cheese, lettuce, bun, bacon, pepper, background).

Measured: in light mode the white button clears 4.9:1+ against every fill it sits on; on the pale fills it would have been 1.4–2.9:1, so those keep the dark button. salt inverts like white-pepper because the theme primary on it would be 2.1 / 2.7:1.

Implementation: stylesByTheme carries a cta: 'theme' | 'white' | 'inverted' per theme, mapped to no class, btn-primary-white, or btn-primary-inverted. The ink-specific solid modifiers from #6672 are gone.

Storybook: contrast numbers and per-theme notes follow the new rule; the before/after story's top row is labeled as the pre-#6672 bar.

Trade-off to be aware of: in dark mode the white button sits on the pale fills (cheese, lettuce, avocado, blue-cheese) at 1.3–1.7:1 against the bar edge; the label itself stays fully legible.

Events

No new tracking events.

Experiment

No new experiments.

🤖 Generated with Claude Code

Preview domain

https://claude-announcement-bar-cta-them.preview.app.daily.dev

#6672 chose the CTA from the bar's ink, so pale bars always got the dark
button and deep bars the white one. The product call is the opposite:
the bar shows the theme's own primary button, white in dark mode and
dark in light mode, on every fill. The only exception is the two neutral
fills that flip with the theme (white-pepper and salt), where the theme
primary would match the bar, so those invert it.

The two ink-specific solid modifiers are gone; `btn-primary-inverted`
replaces `btn-on-fill-solid-invert` for the exception.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
daily-webapp Ready Ready Preview Sep 16, 2026 1:19pm UTC

Request Review

In light mode the bars whose text is white (the purples, blue, red and
brown) read better with the white primary than the dark one, and the
white button clears 4.9:1 or more against every one of those fills. The
pale bars keep the theme's dark button there since white would sit at
1.4-2.9:1 against them.

Adds a `white` CTA mode (`btn-primary-white`) next to `theme` and
`inverted`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tsahimatsliah
tsahimatsliah merged commit 41c804e into main Sep 17, 2026
12 checks passed
@tsahimatsliah
tsahimatsliah deleted the claude/announcement-bar-cta-theme branch September 17, 2026 07:56
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.

2 participants