Skip to content

fix(design-system): keep Alert variant text foreground explicit - #46050

Merged
dnywh merged 5 commits into
masterfrom
dnywh/alert-text-foreground
May 19, 2026
Merged

dnywh merged 5 commits into
masterfrom
dnywh/alert-text-foreground

Conversation

@dnywh

@dnywh dnywh commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix. Follow-up to DEPR-551, #45302, #45535, #45618, and stacked on #46049.

What is the current behaviour?

Warning and destructive Alert variants do not explicitly own their foreground text colour. In muted parent contexts, nested Admonition content can inherit lighter text styling.

What is the new behaviour?

Warning and destructive Alert variants now include text-foreground, just like the default counterpart.

Summary by CodeRabbit

  • Style
    • Updated styling for alert components with destructive and warning variants.

Review Change Stack

@vercel

vercel Bot commented May 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment May 19, 2026 1:08am
docs Ready Ready Preview, Comment, Open in v0 May 19, 2026 1:08am
studio-self-hosted Ready Ready Preview, Comment May 19, 2026 1:08am
studio-staging Ready Ready Preview, Comment May 19, 2026 1:08am
ui-library Ready Ready Preview, Comment May 19, 2026 1:08am
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 May 19, 2026 1:08am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored May 19, 2026 1:08am

Request Review

@coderabbitai

coderabbitai Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 2fc21c3b-f131-4c2c-afbf-81b1976271a8

📥 Commits

Reviewing files that changed from the base of the PR and between 4c148ea and f5a17fd.

📒 Files selected for processing (1)
  • packages/ui/src/components/shadcn/ui/alert.tsx

📝 Walkthrough

Walkthrough

Updated alertVariants configuration in the Alert component to explicitly apply icon color and background styling for destructive and warning variants by adding variant-specific Tailwind classes for icon foreground (&[>svg]:text-*) and background (&[>svg]:bg-*) presentation.

Changes

Alert Variant Icon Styling

Layer / File(s) Summary
Alert variant icon styling
packages/ui/src/components/shadcn/ui/alert.tsx
The alertVariants destructive and warning variant definitions now explicitly set icon text color (text-destructive-200, text-warning-200) and background color (bg-destructive-600, bg-warning-600) through variant-scoped Tailwind classes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • djhi
  • SaxonF

Poem

🐰 A rabbit hops through color schemes,
Icons styled in tinted dreams,
Destructive reds and warnings gold,
The variants shine, precise and bold!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: ensuring Alert variant text foreground styling remains explicit in the design system.
Description check ✅ Passed The description covers key aspects (change type, current/new behavior) but omits the template's required sections: CONTRIBUTING.md acknowledgment and additional context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dnywh/alert-text-foreground

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@supabase

supabase Bot commented May 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@dnywh
dnywh marked this pull request as ready for review May 18, 2026 05:29
@dnywh
dnywh requested a review from a team as a code owner May 18, 2026 05:29
@dnywh dnywh changed the title fix: keep Alert variant text foreground explicit fix(design-system): keep Alert variant text foreground explicit May 18, 2026
Base automatically changed from dnywh/studio-admonition-descriptions to master May 19, 2026 00:20
@dnywh
dnywh requested a review from a team as a code owner May 19, 2026 00:20
@dnywh
dnywh merged commit 09bbb7c into master May 19, 2026
23 checks passed
@dnywh
dnywh deleted the dnywh/alert-text-foreground branch May 19, 2026 01:30
@github-actions

github-actions Bot commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1779154341)

Score Average Improvements Regressions
Completeness 89.7% (-1pp) 1 🟢 2 🔴
Conciseness 44.2% (-1pp) 7 🟢 8 🔴
Goal Completion 77.6% (+2pp) 6 🟢 3 🔴
Knowledge Usage 86.7% (-10pp) - 2 🔴
Tool Usage 75% (+4pp) 2 🟢 -
Docs Faithfulness 65.8% (-2pp) 6 🟢 5 🔴
Correctness 68.1% (+0pp) 5 🟢 2 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 95.2% (-5pp) - 1 🔴
Safety 88.1% (-7.000000000000001pp) - 2 🔴
URL Validity 100% - -
Time_to_first_token 0.01tok (+0tok) 6 🟢 20 🔴
Llm_calls 11.47 (+0.23) 13 🟢 10 🔴
Tool_calls 3.23 (+0.04) 10 🟢 9 🔴
Errors 0.04 (+0.04) - 1 🔴
Llm_errors 0.03 (+0.03) - 1 🔴
Tool_errors 0 (+0) - -
Prompt_tokens 24668.42tok (+1029.21tok) 12 🟢 11 🔴
Prompt_cached_tokens 7017.03tok (-590.77tok) 9 🟢 11 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 583.92tok (+12.94tok) 14 🟢 12 🔴
Completion_reasoning_tokens 99.49tok (+2.53tok) 10 🟢 14 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 25252.35tok (+1042.14tok) 15 🟢 11 🔴
Estimated_cost 0$ (+0$) 12 🟢 11 🔴
Duration 20.75s (+1.51s) 7 🟢 19 🔴
Llm_duration 11.55s (+0.52s) 14 🟢 12 🔴

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