Repository navigation
fix(studio): warning colours broken in light mode after colour migration - #47660
Conversation
Replace hsl(var(--warning-default)) with var(--warning) for chart and indicator colours, since --warning-default was removed in light mode.
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR updates warning color tokens across global theme variables, grid styling, and several chart/component configurations, replacing ChangesWarning Color Token Update
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Fixes Studio warning color rendering in light mode after the color-token migration by removing remaining references to --warning-default and switching impacted UI/chart surfaces to the semantic --warning token (plus a targeted --warning-600 for grid “dirty” text).
Changes:
- Updated multiple chart/config call sites to use
var(--warning)so warning fills/swatches render correctly in light mode. - Updated Studio global CSS tokens (
--chart-warning,--sidebar-primary-foreground) to reference the semantic warning color. - Adjusted table editor “dirty cell” text color to
hsl(var(--warning-600))for better contrast on the warning background.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-patterns/src/LogsBarChart/index.tsx | Switches warning bar segment color to semantic --warning to avoid invalid light-mode color resolution. |
| apps/studio/styles/grid.css | Uses --warning-600 for dirty-cell text to keep it legible on the warning background. |
| apps/studio/styles/globals.css | Updates --chart-warning and --sidebar-primary-foreground to use semantic --warning. |
| apps/studio/components/ui/CountdownTimer/CountdownTimerRadial.tsx | Updates radial timer warning color to semantic --warning. |
| apps/studio/components/interfaces/UnifiedLogs/UnifiedLogs.tsx | Updates unified logs warning series color to semantic --warning. |
| apps/studio/components/interfaces/QueryInsights/QueryInsightsHealth/QueryInsightsHealth.constants.ts | Updates health “warning” color to semantic --warning. |
| apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionOverview.utils.ts | Updates Edge Function overview warning series color to semantic --warning. |
🎭 Playwright Test ResultsDetails
Flaky testsFeatures › queue-table-operations.spec.ts › Queue Table Operations › pending changes persist when switching between tables Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
| .rdg-cell.rdg-cell--dirty { | ||
| background-color: hsl(var(--warning-300) / 0.75); | ||
| color: hsl(var(--warning-default)); | ||
| color: hsl(var(--warning-600)); |
There was a problem hiding this comment.
--warning-600 rather than --warning because that’s text on a light amber cell background.
Use theme-aware --chart-warning tokens (warning-500/400 in light, warning-default/500 in dark) so bar chart warnings match prod contrast against green and red segments.
Braintrust eval report
|
What kind of change does this PR introduce?
UI bug fix
What is the current behavior?
After the colour system migration (#47288),
--warning-defaultwas removed in light mode in favour of the semantic--warningtoken. Several studio call sites still referencedhsl(var(--warning-default)), which resolves to an invalid colour in light mode.This caused warning segments in stacked bar charts (e.g. Realtime on project overview v2) to render black instead of amber, with missing tooltip swatches. The colour appeared to "fix itself" on hover because the dimmed state used
--warning-500, which is still defined.What is the new behaviour?
Studio consumers that referenced the removed token now point at tokens that still resolve in light mode. Chart warnings use new app-level
--chart-warning/--chart-warning-mutedvariables (stepped scale, theme-aware) rather than the removed--warning-default.We only update Studio app consumers that were still calling the old token:
LogsBarChart→--chart-warningtokensapps/studio/styles/globals.css→ defines those chart tokens + fixes--sidebar-primary-foregroundEdgeFunctionOverview,UnifiedLogs, etc.)--warning-600(still on the stepped scale)To test
Use a hosted project that already has warnings on project home (e.g. Realtime with a non-zero warnings count). Switch Studio to light mode.
newHomepageUsageDeltasflag enabled).Summary by CodeRabbit
--chart-warning/--chart-warning-muted).