From 4e0da0c237be5cdba1c5a1c6a9c20131acb88d1b Mon Sep 17 00:00:00 2001 From: Guillem Arias Fauste Date: Mon, 8 Jun 2026 21:40:22 +0200 Subject: [PATCH] fix(ds): dark-parity for bespoke green status badges (#2142) * fix(ds): dark-parity for bespoke green status badges (#2134) The status/type badges in recurring transactions, admin SSO providers, and the categorize group title used solid light-green tints (bg-green-50/100 + text-green-700/800) with no dark variant, so they rendered as pale "stickers" on dark. Add theme-dark variants mirroring DS::Pill's soft recipe (bg-green-tint-10 + text-green-200); dark text contrast 9.5-14.2:1. Their neutral siblings were already token-based. Audit-named _status_pill / _maturity_badge already render via DS::Pill; remaining solid-tint spots are alpha icon-containers (bg-*-500/5,/10) that composite fine on dark. Full DS::Pill consolidation tracked separately. * fix(ds): dark-parity for bespoke amber/blue notices + SSO badge (#2134) Continues the bespoke-badge tail: the raw-amber warning notices (securities SSO warning, admin SSO legacy-providers notice) + the env-configured badge, and the AI tool-call info box, were solid light tints (bg-amber-50/100 / bg-blue-50) with no dark variant -> pale "stickers" on dark. Add theme-dark variants mirroring the soft recipe: alpha-tint bg (amber/blue-500/10-15), lightened border, light text/icon (amber-200/400). Verified legible on dark. Pre-auth (sessions/new) + infra (redis error) amber notices render light-only, left as-is. Broader: these warning boxes want a shared DS notice/callout component (#2137). --- app/views/admin/sso_providers/index.html.erb | 10 +++++----- app/views/assistant_messages/_tool_calls.html.erb | 2 +- app/views/recurring_transactions/index.html.erb | 2 +- app/views/settings/securities/show.html.erb | 6 +++--- .../transactions/categorizes/_group_title.html.erb | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/admin/sso_providers/index.html.erb b/app/views/admin/sso_providers/index.html.erb index c799d374d..6120b52ea 100644 --- a/app/views/admin/sso_providers/index.html.erb +++ b/app/views/admin/sso_providers/index.html.erb @@ -26,7 +26,7 @@
<% if provider.enabled? %> - + <%= t(".enabled") %> <% else %> @@ -64,10 +64,10 @@ <% if @legacy_providers.any? %> <%= settings_section title: t("admin.sso_providers.index.legacy_providers_title"), collapsible: true, open: true do %> -
+
- <%= icon "alert-triangle", class: "w-5 h-5 text-amber-600 shrink-0" %> -

+ <%= icon "alert-triangle", class: "w-5 h-5 text-amber-600 shrink-0 theme-dark:text-amber-400" %> +

<%= t("admin.sso_providers.index.legacy_providers_notice") %>

@@ -90,7 +90,7 @@
- + <%= t("admin.sso_providers.index.env_configured") %>
diff --git a/app/views/assistant_messages/_tool_calls.html.erb b/app/views/assistant_messages/_tool_calls.html.erb index d2adace6a..b301a5d4a 100644 --- a/app/views/assistant_messages/_tool_calls.html.erb +++ b/app/views/assistant_messages/_tool_calls.html.erb @@ -8,7 +8,7 @@
<% message.tool_calls.each do |tool_call| %> -
+

<%= t(".function") %>

<%= tool_call.function_name %>

<%= t(".arguments") %>

diff --git a/app/views/recurring_transactions/index.html.erb b/app/views/recurring_transactions/index.html.erb index 96b29d4a1..2148b7bb3 100644 --- a/app/views/recurring_transactions/index.html.erb +++ b/app/views/recurring_transactions/index.html.erb @@ -155,7 +155,7 @@ <% if recurring_transaction.active? %> - + <%= t("recurring_transactions.status.active") %> <% else %> diff --git a/app/views/settings/securities/show.html.erb b/app/views/settings/securities/show.html.erb index c0482ac98..f94878cd4 100644 --- a/app/views/settings/securities/show.html.erb +++ b/app/views/settings/securities/show.html.erb @@ -160,10 +160,10 @@ <% end %>
<% if @oidc_identities.count == 1 && Current.user.password_digest.blank? %> -
+
- <%= icon "alert-triangle", class: "w-5 h-5 text-amber-600 shrink-0 mt-0.5" %> -

<%= t(".sso_warning_message") %>

+ <%= icon "alert-triangle", class: "w-5 h-5 text-amber-600 shrink-0 mt-0.5 theme-dark:text-amber-400" %> +

<%= t(".sso_warning_message") %>

<% end %> diff --git a/app/views/transactions/categorizes/_group_title.html.erb b/app/views/transactions/categorizes/_group_title.html.erb index 948b504ac..a23ab1961 100644 --- a/app/views/transactions/categorizes/_group_title.html.erb +++ b/app/views/transactions/categorizes/_group_title.html.erb @@ -2,7 +2,7 @@

<%= display_name %>

<% if transaction_type == "income" %> - <%= t("transactions.categorizes.show.type_income") %> + <%= t("transactions.categorizes.show.type_income") %> <% elsif transaction_type == "expense" %> <%= t("transactions.categorizes.show.type_expense") %> <% end %>