From eb6bbb754dfe8c0fe1983d8257700660726d82ab Mon Sep 17 00:00:00 2001 From: Alessio Cappa <104093777+alessiocappa@users.noreply.github.com> Date: Fri, 12 Dec 2025 10:43:10 +0100 Subject: [PATCH] Outlfows UI adjustments (#443) * feat: combine icon + color in outflows section to optimize space on mobile * fix: adjust spacing in outflows table * fix: adjust padding and icon sizing --- .../pages/dashboard/_outflows_donut.html.erb | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/app/views/pages/dashboard/_outflows_donut.html.erb b/app/views/pages/dashboard/_outflows_donut.html.erb index 7751fa743..2657662c7 100644 --- a/app/views/pages/dashboard/_outflows_donut.html.erb +++ b/app/views/pages/dashboard/_outflows_donut.html.erb @@ -13,11 +13,10 @@
-
+
-
+
<% outflows_data[:categories].each_with_index do |category, idx| %> <%= link_to transactions_path(q: { categories: [category[:name]], start_date: period.date_range.first, end_date: period.date_range.last }), - class: "flex items-center justify-between mx-3 p-3 rounded-lg cursor-pointer group", + class: "flex items-center justify-between mx-3 p-3 rounded-lg cursor-pointer group gap-3", data: { turbo_frame: "_top", category_id: category[:id], action: "mouseenter->donut-chart#highlightSegment mouseleave->donut-chart#unhighlightSegment" } do %>
-
- <%= icon(category[:icon], class: "w-4 h-4 text-primary flex-shrink-0") %> +
+ <% if category[:icon] %> + <%= icon(category[:icon], color: "current", size: "sm") %> + <% else %> + <%= render DS::FilledIcon.new( + variant: :text, + hex_color: category[:color], + text: category[:name], + size: "sm", + rounded: true + ) %> + <% end %> +
<%= category[:name] %>
-
+
<%= format_money Money.new(category[:amount], category[:currency]) %> - <%= category[:percentage] %>% + <%= category[:percentage] %>%
<% end %> <% if idx < outflows_data[:categories].size - 1 %>