Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

fix(ds): balance-sheet weight column alignment + category pill padding (#2275)

Guillem Arias Fauste7ebe5154cb03
diff --git a/app/components/DS/pill.rb b/app/components/DS/pill.rb
index b9ef102dbb..a51084652f 100644
--- a/app/components/DS/pill.rb
+++ b/app/components/DS/pill.rb
@@ -178,7 +178,7 @@ class DS::Pill < DesignSystemComponent
# tracking snap to Tailwind's scale to satisfy the design-system
# "no arbitrary values" rule.
base << "rounded-md uppercase"
- base << (size == :md ? "px-2 py-0.5 text-[11px] tracking-wide gap-1" : "px-1.5 py-0.5 text-[10px] tracking-wider gap-1")
+ base << (size == :md ? "px-2 py-1 text-[11px] tracking-wide gap-1" : "px-1.5 py-0.5 text-[10px] tracking-wider gap-1")
else
# Badge mode (Pending / Active / Past due / category tag):
# rounded-full pill shape (matches the existing convention used
@@ -186,7 +186,7 @@ class DS::Pill < DesignSystemComponent
# the inline transaction badges). Normal case, snaps to the
# design-system text scale (`text-xs` / `text-sm`).
base << "rounded-full"
- base << (size == :md ? "px-2 py-0.5 text-sm gap-1.5" : "px-1.5 py-0.5 text-xs gap-1")
+ base << (size == :md ? "px-2 py-1 text-sm gap-1.5" : "px-1.5 py-0.5 text-xs gap-1")
end
class_names(*base)
end
diff --git a/app/views/pages/dashboard/_balance_sheet.html.erb b/app/views/pages/dashboard/_balance_sheet.html.erb
index 1c104fa280..5d2d476f44 100644
--- a/app/views/pages/dashboard/_balance_sheet.html.erb
+++ b/app/views/pages/dashboard/_balance_sheet.html.erb
@@ -82,7 +82,7 @@
</div>
<div class="ml-auto flex items-center text-right gap-2">
- <div class="w-14 shrink-0 flex items-center justify-end gap-2">
+ <div class="w-20 shrink-0 flex items-center justify-end gap-2">
<%
# Calculate weight as percentage of classification total
classification_total = classification_group.total_money.amount
diff --git a/app/views/pages/dashboard/_group_weight.html.erb b/app/views/pages/dashboard/_group_weight.html.erb
index 4cf5e827de..8a319ef934 100644
--- a/app/views/pages/dashboard/_group_weight.html.erb
+++ b/app/views/pages/dashboard/_group_weight.html.erb
@@ -8,5 +8,5 @@
<div class="w-0.5 h-2.5 rounded-lg <%= i < (effective_weight / 20.0).ceil ? "" : "opacity-20" %>" style="background-color: <%= color %>;"></div>
<% end %>
</div>
- <p class="text-sm privacy-sensitive"><%= number_to_percentage(effective_weight, precision: 0) %></p>
+ <p class="text-sm whitespace-nowrap privacy-sensitive"><%= number_to_percentage(effective_weight, precision: 0) %></p>
</div>