Repository navigation
fix(theme): align badge color tokens with the Luma design system - #214
Merged
Merged
Conversation
Merged
3 of 9 tasks
BADGE_WARNING_ACCENT (#FFA800) diverged from theme.colors.variant.warning and theme.colors.alerts.warning, making the warning badge inconsistent with adjacent warning surfaces. The Figma badge references the design system's Yellow/5 token, i.e. the same slot as warning[5], so read from the ramp like every other badge color.
laura-b-g
marked this pull request as ready for review
August 25, 2026 14:55
laura-b-g
requested review from
dennisoelkers,
gally47,
linuspahl and
ousmaneo
August 25, 2026 14:55
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.
Description
Aligns the theme's badge color tokens (
theme.colors.badges) with the current design system spec. Renames the color keys to the same semantic names used everywhere else in the theme (primary/danger/success/warning/gray), fixes the light-variant opacity forprimary(it previously rendered as a solid fill instead of tinted), adds a badge-scoped accent color forwarningmatching the current spec, and fixes an inverted background/text pairing ongray's filled variant. Also removes the now-unused per-colordot.colorfield — dot indicators derive their color from the badge's own text color at the consuming component instead.Motivation and Context
These tokens existed in the theme already but had drifted from the current design spec and weren't consumed by any component yet. A companion PR in
graylog2-server(see/prdbelow) introduces the Badge component that reads them.How can this be tested?
Areas to test:
theme.colors.badges.<color>.<light|filled>.{background,text}for all five colors, in both light and dark mode.Setup:
yarn install && yarn test— the styled-components theme snapshot test covers the full color output.Happy path:
primary/danger/success/warning/grayeach resolve a correct background/text pair for both thelightandfilledvariant.Edge cases:
primary/dangerstill differ between light/dark mode (their base color shades do);success/warning/grayare intentionally mode-agnostic, matching their existing behavior./prd Graylog2/graylog2-server#27038