From a71b62575c1313edc57562e9791250dc88d76a37 Mon Sep 17 00:00:00 2001 From: Alex Hatzenbuhler Date: Thu, 22 May 2025 10:35:55 -0500 Subject: [PATCH] UI Fixes (#2276) * Use rounded-full on budget allocation bar * Fix backgrounds when balance sheet groups are open * Add rulers between accounts and classification groups in balance sheet and account groups views. --- app/views/accounts/index/_account_groups.erb | 5 +++- app/views/budgets/_actuals_summary.html.erb | 4 ++-- .../pages/dashboard/_balance_sheet.html.erb | 23 +++++++++++++++---- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/app/views/accounts/index/_account_groups.erb b/app/views/accounts/index/_account_groups.erb index 6c1ba1ed..841e60c2 100644 --- a/app/views/accounts/index/_account_groups.erb +++ b/app/views/accounts/index/_account_groups.erb @@ -12,8 +12,11 @@ <% end %>
- <% accounts.each do |account| %> + <% accounts.each_with_index do |account, index| %> <%= render account %> + <% unless index == accounts.count - 1 %> + <%= render "shared/ruler" %> + <% end %> <% end %>
diff --git a/app/views/budgets/_actuals_summary.html.erb b/app/views/budgets/_actuals_summary.html.erb index 784f2020..5b4adf1d 100644 --- a/app/views/budgets/_actuals_summary.html.erb +++ b/app/views/budgets/_actuals_summary.html.erb @@ -12,7 +12,7 @@
<% budget.income_category_totals.each do |category_total| %> -
+
<% end %>
@@ -38,7 +38,7 @@
<% budget.expense_category_totals.each do |category_total| %> -
+
<% end %>
diff --git a/app/views/pages/dashboard/_balance_sheet.html.erb b/app/views/pages/dashboard/_balance_sheet.html.erb index a73e6a03..7a71afe7 100644 --- a/app/views/pages/dashboard/_balance_sheet.html.erb +++ b/app/views/pages/dashboard/_balance_sheet.html.erb @@ -58,10 +58,13 @@
-
- <% classification_group.account_groups.each do |account_group| %> -
- +
+ <% classification_group.account_groups.each_with_index do |account_group, idx| %> +
+ <%= idx == classification_group.account_groups.size - 1 ? "rounded-b-lg" : "" %> + "> +
<%= icon("chevron-right", class: "group-open:rotate-90") %> @@ -93,7 +96,7 @@
<% account_group.accounts.each_with_index do |account, idx| %> -
+
<%= render "accounts/logo", account: account, size: "sm", color: account_group.color %> @@ -129,6 +132,9 @@ <% end %>
+ <% unless idx == classification_group.account_groups.size - 1 %> + <%= render "shared/ruler", classes: "mx-4 group-ruler" %> + <% end %> <% end %>
@@ -147,3 +153,10 @@ <% end %> + +<%# Custom style for hiding ruler when details are open %> +