The personal finance app for everyone (by everyone)
Ruby
fix(ds): route remaining literal yellow warning surfaces onto --color-warning (#2250)
Guillem Arias Fausteb2b89437b08e
diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rbindex a119246fda..d35ed07eda 100644--- a/app/helpers/accounts_helper.rb+++ b/app/helpers/accounts_helper.rb@@ -36,7 +36,7 @@ module AccountsHelperend[- family.build_cache_key("account_sidebar_tabs_v1", invalidate_on_data_updates: true),+ family.build_cache_key("account_sidebar_tabs_v2", invalidate_on_data_updates: true),Current.user&.id,shares_version,active_tab,diff --git a/app/views/accounts/_account_sidebar_tabs.html.erb b/app/views/accounts/_account_sidebar_tabs.html.erbindex 653a64c857..9b90870910 100644--- a/app/views/accounts/_account_sidebar_tabs.html.erb+++ b/app/views/accounts/_account_sidebar_tabs.html.erb@@ -3,22 +3,12 @@<% cache account_sidebar_tabs_cache_key(family: family, active_tab: active_tab, mobile: mobile), expires_in: 12.hours do %><div id="account-sidebar-tabs"><% if family.missing_data_provider? %>- <details class="group bg-yellow-tint-10 rounded-lg p-2 text-yellow-600 mb-3 text-xs">- <summary class="flex items-center justify-between gap-2">- <div class="flex items-center gap-2">- <%= icon "triangle-alert", size: "sm", color: "warning" %>- <p class="font-medium"><%= t("accounts.sidebar.missing_data") %></p>- </div>-- <%= icon("chevron-down", color: "warning", class: "group-open:transform group-open:rotate-180") %>- </summary>- <div class="text-xs py-2 space-y-2">- <p><%= t("accounts.sidebar.missing_data_description", product: product_name) %></p>- <p>- <%= link_to t("accounts.sidebar.configure_providers"), settings_hosting_path, class: "text-yellow-600 underline" %>- </p>- </div>- </details>+ <div class="mb-3">+ <%= render DS::Alert.new(title: t("accounts.sidebar.missing_data"), variant: :warning) do %>+ <p class="text-secondary"><%= t("accounts.sidebar.missing_data_description", product: product_name) %></p>+ <p><%= link_to t("accounts.sidebar.configure_providers"), settings_hosting_path, class: "underline font-medium" %></p>+ <% end %>+ </div><% end %><%= render DS::Tabs.new(active_tab: active_tab, session_key: "account_sidebar_tab", testid: "account-sidebar-tabs") do |tabs| %>diff --git a/app/views/import/confirms/_mappings.html.erb b/app/views/import/confirms/_mappings.html.erbindex 2cfb6ab460..9ad0329035 100644--- a/app/views/import/confirms/_mappings.html.erb+++ b/app/views/import/confirms/_mappings.html.erb@@ -23,7 +23,7 @@<% elsif import.has_unassigned_account? %><div class="w-full max-w-full overflow-hidden mb-4"><div class="overflow-x-auto">- <div class="flex items-center justify-between p-4 gap-4 text-secondary bg-yellow-100 border border-yellow-200 rounded-lg w-[650px] min-w-0 mx-auto">+ <div class="flex items-center justify-between p-4 gap-4 text-secondary bg-warning/10 border border-warning/20 rounded-lg w-[650px] min-w-0 mx-auto"><%= tag.p t(".unassigned_account"), class: "text-sm" %><%= render DS::Link.new(text: t(".create_account"),diff --git a/app/views/rules/index.html.erb b/app/views/rules/index.html.erbindex 4c43de8641..57fc04e121 100644--- a/app/views/rules/index.html.erb+++ b/app/views/rules/index.html.erb@@ -147,17 +147,11 @@<td class="px-4 py-3 text-sm text-center"><div class="flex items-center justify-center gap-2"><% if run.pending? %>- <span class="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-yellow-50 text-yellow-700 theme-dark:bg-yellow-950/30 theme-dark:text-yellow-400">- <%= t("rules.recent_runs.statuses.#{run.status}") %>- </span>+ <%= render DS::Pill.new(label: t("rules.recent_runs.statuses.#{run.status}"), tone: :warning, marker: false) %><% elsif run.success? %>- <span class="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-green-50 text-green-700 theme-dark:bg-green-950/30 theme-dark:text-green-400">- <%= t("rules.recent_runs.statuses.#{run.status}") %>- </span>+ <%= render DS::Pill.new(label: t("rules.recent_runs.statuses.#{run.status}"), tone: :success, marker: false) %><% else %>- <span class="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-red-50 text-red-700 theme-dark:bg-red-950/30 theme-dark:text-red-400">- <%= t("rules.recent_runs.statuses.#{run.status}") %>- </span>+ <%= render DS::Pill.new(label: t("rules.recent_runs.statuses.#{run.status}"), tone: :error, marker: false) %><% end %><% if run.failed? && run.error_message.present? %><div data-controller="tooltip" data-tooltip-content-value="<%= run.error_message %>">diff --git a/app/views/simplefin_items/_replacement_prompt.html.erb b/app/views/simplefin_items/_replacement_prompt.html.erbindex 4337a8f69f..095601f9ee 100644--- a/app/views/simplefin_items/_replacement_prompt.html.erb+++ b/app/views/simplefin_items/_replacement_prompt.html.erb@@ -20,7 +20,7 @@<% dismissal_key = "#{old_sfa.id}:#{new_sfa.id}" %><% next if dismissed_ids.include?(dismissal_key) %>- <div class="bg-yellow-50 theme-dark:bg-yellow-900/20 border border-yellow-200 theme-dark:border-yellow-800 rounded-lg p-4">+ <div class="bg-warning/10 border border-warning/20 rounded-lg p-4"><div class="flex items-start gap-3"><%= icon "credit-card", size: "sm", color: "warning", class: "shrink-0 mt-0.5" %><div class="flex-1 space-y-2">@@ -33,7 +33,7 @@params: { dormant_sfa_id: old_sfa.id, active_sfa_id: new_sfa.id },method: :post,form: { class: "inline shrink-0" },- class: "-mt-1 -mr-1 p-1 rounded hover:bg-yellow-100 theme-dark:hover:bg-yellow-900/40 text-secondary",+ class: "-mt-1 -mr-1 p-1 rounded hover:bg-warning/20 text-secondary",aria: { label: t("simplefin_items.replacement_prompt.dismiss_aria") } do %><%= icon "x", size: "sm" %><% end %>