Files
sure/app/views/pages/dashboard/_group_weight.html.erb
Guillem Arias Fauste 7ebe5154cb fix(ds): balance-sheet weight column alignment + category pill padding (#2275)
- Dashboard balance-sheet weight cell wrapped its percentage ("64 %" -> two
  lines) for 2-digit values: the account-row cell is w-14 (56px), too narrow
  for the 5-bar gauge plus a spaced locale percentage (ca/es format "NN %").
  Widen the account-row weight cell to w-20 to match the header/group columns
  (also fixing the column misalignment) and add whitespace-nowrap to the value.
- Bump DS::Pill :md vertical padding py-0.5 -> py-1 so category pills (and the
  other :md pills) are not vertically cramped.
2026-06-11 15:32:07 +02:00

13 lines
500 B
Plaintext

<%# locals: (weight:, color:) %>
<% effective_weight = weight.presence || 0 %>
<div class="w-full flex items-center justify-between gap-2">
<div class="flex gap-[3px]">
<% 5.times do |i| %>
<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 whitespace-nowrap privacy-sensitive"><%= number_to_percentage(effective_weight, precision: 0) %></p>
</div>