From bc0dcdd41ba0ad6e0c2bbfd714b5b8eb6e22d86c Mon Sep 17 00:00:00 2001 From: Guillem Arias Fauste Date: Sun, 14 Jun 2026 21:50:11 +0200 Subject: [PATCH] fix(ds): neutral text for goals status callout (#2312) The goals status callout colored its entire body (icon, label and context) with text-warning / text-success / text-secondary, so a behind goal rendered as all-yellow text. That diverges from the DS::Alert recipe, where tinted boxes keep neutral body text (text-primary) and only the icon carries the status color. Drop the text-* tokens from the container, add text-primary, and move the warning/success color onto the icon via color:. --- app/views/goals/_status_callout.html.erb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/views/goals/_status_callout.html.erb b/app/views/goals/_status_callout.html.erb index a2c609ad3..a8118fbc9 100644 --- a/app/views/goals/_status_callout.html.erb +++ b/app/views/goals/_status_callout.html.erb @@ -4,11 +4,11 @@ variant_classes = case goal.status when :behind - "bg-warning/10 border-warning/20 text-warning" + "bg-warning/10 border-warning/20" when :on_track - "bg-success/10 border-success/20 text-success" + "bg-success/10 border-success/20" else - "bg-surface-inset border-secondary text-secondary" + "bg-surface-inset border-secondary" end icon_glyph = case goal.status @@ -18,10 +18,16 @@ else "info" end + icon_color = case goal.status + when :behind then "warning" + when :on_track then "success" + else "default" + end + label = t("goals.status.#{goal.status}", default: goal.status.to_s.titleize) %> -
- <%= icon(icon_glyph, size: "sm") %> +
+ <%= icon(icon_glyph, size: "sm", color: icon_color) %> <%= label %> ยท "><%= context %>