cleanup(ui): centralize duplicate badge colors and align Helm wizard with brand#594
Merged
nadaverell merged 3 commits intomainfrom Apr 30, 2026
Merged
cleanup(ui): centralize duplicate badge colors and align Helm wizard with brand#594nadaverell merged 3 commits intomainfrom
nadaverell merged 3 commits intomainfrom
Conversation
…with brand
Three buckets of design-system cleanup, all per DESIGN.md.
Mechanical centralization (no visual change):
- Move CAPACITY_TYPE_BADGE from resource-utils-karpenter.ts into badge-colors.ts
alongside the other shared badge palettes; add NODEPOOL_MODE_BADGE for the
AKS System/User pattern. Convert hand-rolled duplicate strings in
AzureManagedMachinePoolRenderer, AWSManagedMachinePoolRenderer,
azure-capi-cells, aws-capi-cells, karpenter-cells, and
KarpenterNodeClaimRenderer to reference the shared constants.
- Replace template-literal Tailwind class construction
(\`bg-amber-500\${opacity}\`) in TimelineSwimlanes and timeline/shared with
explicit static strings so the scanner can see them.
Helm wizard brand alignment (visual fix):
- InstallWizard and ChartBrowser used raw \`bg-blue-*\`/\`text-blue-*\` (#3B82F6),
noticeably different from the rest of the app's brand accent
(#4A7CC9 light / #6A9FE0 dark). Convert active step pills, hyperlinks,
focus rings, checkbox accents, decorative icons, and the standalone
"Ready to install" info banners to bg-accent / text-accent / accent-muted /
text-accent-text. Replace bg-white/10 chart-logo backdrops with
bg-theme-elevated.
- Three blue uses are deliberately kept: the values diff hunk header (paired
with bg-green-500/10 add and bg-red-500/10 remove rows) and the install
progress panel + spinner (paired with bg-green-500/10 success and
bg-red-500/10 error). In both cases blue is part of a categorical/status
triple, not brand.
Two more passes of the design-system cleanup, same shape as the prior commit. Centralize the "inactive / unknown / pending" badge: - The string \`bg-gray-500/20 text-gray-400\` was duplicated 23 times across 16 renderer files as the de-facto fallback for unknown status, unset modes, pending steps, missing severity, etc. - Add \`BADGE_INACTIVE\` to badge-colors.ts and reference it from all 16 files (Gateway, GatewayClass, Order, Challenge, RoleBinding, IngressClass, Rollout, ArgoApplication, ClusterComplianceReport, ConfigAuditReport, ExposedSecretReport, IstioGateway, IstioPeerAuthentication, IstioAuthorizationPolicy, KarpenterNodeClaim, istio-cells). Timeline brand alignment: - TimelineSwimlanes had the same brand outliers as the Helm wizard: search-input focus ring, "Group by app" checkbox, "→ Now" jump-to-current button, hover-on-resource-name links (4 sites), workload-pill highlight, and the workload-children left border. Convert to bg-accent / text-accent / text-accent-text / focus:ring-accent / border-accent. - Three blue uses are deliberately preserved: the legend item for "modified" and the rolling-health legend item (paired with green/red/amber as a 4-color categorical legend) and the live event marker (paired with green add / red delete inside the change-event triple). Same justification as the kept blues in InstallWizard.
Convert the update notification's outer chrome (border, icon backdrop, idle and downloading/applying icons, progress bar fill, GitHub release link) from raw bg-blue-* / text-blue-* to bg-accent / text-accent / accent-muted / accent-text / border-accent. Green stays for the 'Ready' state icon and the 'Restart Now' button (semantic success), red stays for error text. Unlike the InstallWizard install panel, the blue here is the notification's overall identity color, not part of a green/red status triple — so the brand swap is unambiguous.
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.
Summary
Three buckets of design-system cleanup driven by an audit against
DESIGN.md. All token / centralization changes; no behavior changes.Mechanical centralization (no visual change).
CAPACITY_TYPE_BADGEmoved fromresource-utils-karpenter.tsintobadge-colors.tsalongside the other shared palettes (EVENT_TYPE_COLORS,BP_CATEGORY_BADGE,VULN_SEVERITY_BADGE, …). AddedNODEPOOL_MODE_BADGEfor the AKS System/User pattern that was hand-rolled in two places. Five inline-duplicated badge strings acrossAzureManagedMachinePoolRenderer,AWSManagedMachinePoolRenderer,azure-capi-cells,aws-capi-cells,karpenter-cells, andKarpenterNodeClaimRenderernow reference the shared constants.`bg-amber-500${opacity}`) inTimelineSwimlanesandtimeline/sharedwith explicit static strings so the Tailwind scanner can see them. Same runtime output.Helm wizard brand alignment (visual fix).
InstallWizard.tsxandChartBrowser.tsxwere the largest concentration of rawbg-blue-*/text-blue-*violations — generic Tailwind#3B82F6, noticeably different from the app's brand accent (#4A7CC9light /#6A9FE0dark, used in 28 other files via.btn-brand/bg-accent/text-accent-text). Converted active step pills, hyperlinks, focus rings, checkbox accents, decorative icons, and the standalone "Ready to install" info banners to the accent tokens. Replacedbg-white/10chart-logo backdrops withbg-theme-elevated(works in both modes; the original was effectively invisible in light mode).Deliberately preserved deviations. Three blue usages in
InstallWizard.tsxare intentionally kept raw: the values diff hunk header (paired withbg-green-500/10add andbg-red-500/10remove rows) and the install progress panel + spinner (paired withbg-green-500/10complete andbg-red-500/10error). In each case blue is part of a categorical/status triple — converting just the blue would break the semantic set.Test plan
make tsc(passes locally)Note
Low Risk
Primarily mechanical styling/token refactors with limited surface area outside UI appearance; main risk is minor visual regressions from class name changes.
Overview
Centralizes badge styling by adding shared constants in
badge-colors.ts(CAPACITY_TYPE_BADGE,NODEPOOL_MODE_BADGE,BADGE_INACTIVE) and updating many K8s resource renderers/table cells to consume them instead of inlined Tailwind class strings.Makes timeline marker coloring Tailwind-safe by replacing template-literal class construction with explicit
bg-*/50class strings in timeline components.Aligns Helm Chart Browser/Install Wizard with the app accent theme by swapping
blue-*focus/selection/link/icon styles (and logo backdrops) toaccenttokens for consistent branding.Reviewed by Cursor Bugbot for commit 2eca377. Bugbot is set up for automated code reviews on this repo. Configure here.