From 83cb2872947c91f23b78188c03ec800d7da1ceff Mon Sep 17 00:00:00 2001 From: Guillem Arias Fauste Date: Mon, 4 May 2026 21:42:44 +0200 Subject: [PATCH] chore(design-system): swap raw gray classes for semantic tokens in settings/ (#1652) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(design-system): swap raw gray classes for semantic tokens in settings/ Pilot for the broader raw-color sweep. Maps 21 occurrences across 11 files to design-system equivalents: - text-white bg-gray-900 hover:bg-gray-800 (CTA buttons) -> text-inverse button-bg-primary hover:button-bg-primary-hover - bg-gray-25 / bg-gray-50 / bg-gray-100 (subtle surface backgrounds) -> bg-surface-inset - bg-gray-800 (tooltip pills) -> bg-inverse - text-white inside tooltips -> text-inverse - text-gray-300 (muted tooltip labels) -> text-inverse opacity-70 - text-gray-600 (muted body text) -> text-secondary - hover:text-gray-700 -> hover:text-primary - focus:ring-gray-900 -> focus:ring-button-bg-primary The 7 status-indicator dots (`bg-gray-400`) are intentionally left as raw classes. Gray-400 against both light and dark container bgs gives reasonable contrast either way, and there's no semantic token that fits a "neutral inactive indicator" use case yet. Worth a follow-up if a `bg-subdued` token would benefit other places. * fix(design-system): use theme-aware focus ring on provider submit buttons Two issues caught in code review: 1. focus:ring-button-bg-primary silently emits no CSS (CodeRabbit, Codex). button-bg-primary is a custom @utility, not a theme color, so Tailwind's ring-{name} resolution finds no --color-button-bg-primary and falls back to the default. Replaces with focus:ring-gray-900 theme-dark:focus:ring-white — same color flip as the button bg, but resolved through theme colors so ring-{name} actually generates CSS. 2. _enable_banking_panel.html.erb dropped focus-ring + transition entirely in the original sweep (CodeRabbit). Restores parity with the other provider panels using the corrected ring classes. Long-term cleanup: tracked under issue #1653 (modifier-aware utilities) to make button-bg-primary also a theme color so ring-button-bg-primary becomes valid. --- app/views/settings/_user_avatar_field.html.erb | 4 ++-- app/views/settings/ai_prompts/show.html.erb | 6 +++--- .../settings/hostings/_twelve_data_settings.html.erb | 4 ++-- app/views/settings/llm_usages/show.html.erb | 6 +++--- app/views/settings/profiles/show.html.erb | 6 +++--- .../settings/providers/_enable_banking_panel.html.erb | 8 ++++---- app/views/settings/providers/_lunchflow_panel.html.erb | 2 +- app/views/settings/providers/_provider_form.html.erb | 2 +- app/views/settings/providers/_simplefin_panel.html.erb | 2 +- app/views/settings/securities/show.html.erb | 2 +- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/views/settings/_user_avatar_field.html.erb b/app/views/settings/_user_avatar_field.html.erb index 1bedac90e..64f23d9b1 100644 --- a/app/views/settings/_user_avatar_field.html.erb +++ b/app/views/settings/_user_avatar_field.html.erb @@ -5,7 +5,7 @@ @@ -52,7 +52,7 @@ <%= form.file_field :profile_image, accept: "image/png, image/jpeg", - class: "hidden px-3 py-2 bg-gray-50 text-primary rounded-md text-sm font-medium", + class: "hidden px-3 py-2 bg-surface-inset text-primary rounded-md text-sm font-medium", data: { profile_image_preview_target: "input", action: "change->profile-image-preview#showFileInputPreview" diff --git a/app/views/settings/ai_prompts/show.html.erb b/app/views/settings/ai_prompts/show.html.erb index 6847b0481..60e11c9bb 100644 --- a/app/views/settings/ai_prompts/show.html.erb +++ b/app/views/settings/ai_prompts/show.html.erb @@ -24,7 +24,7 @@
-
+
<%= icon "message-circle" %>
@@ -52,7 +52,7 @@
-
+
<%= icon "brain" %>
@@ -80,7 +80,7 @@
-
+
<%= icon "store" %>
diff --git a/app/views/settings/hostings/_twelve_data_settings.html.erb b/app/views/settings/hostings/_twelve_data_settings.html.erb index f5d725753..91ee30aca 100644 --- a/app/views/settings/hostings/_twelve_data_settings.html.erb +++ b/app/views/settings/hostings/_twelve_data_settings.html.erb @@ -45,12 +45,12 @@ limit: number_with_delimiter(@twelve_data_usage.data.limit), percentage: number_to_percentage(@twelve_data_usage.data.utilization, precision: 1)) %>

-
+
-
+

<%= t(".plan", plan: @twelve_data_usage.data.plan) %>

diff --git a/app/views/settings/llm_usages/show.html.erb b/app/views/settings/llm_usages/show.html.erb index c2d4660af..7abcd4f5e 100644 --- a/app/views/settings/llm_usages/show.html.erb +++ b/app/views/settings/llm_usages/show.html.erb @@ -135,10 +135,10 @@ <%= icon "alert-circle", class: "w-4 h-4 text-red-600 theme-dark:text-red-400" %> Failed
-