Give each Income plan period one hero figure
Merged
GA
2mo ago+47+47+01234567890123456789-15-15-01234567890123456789
Problem
The Income plan page read flat. In each pay period the date, the safe/short amount and the three breakdown figures (due, reserved, safe) all sat at roughly the same weight, so nothing told you where to look. The allocation bar was h-0.5 and barely registered.
What changes
All of it is in bills/_paycheck_period.html.erb, using tokens only. There are no new surfaces or CSS.
- One hero figure per period. The safe/short amount goes from
text-lgtotext-2xland keeps its tone. The period date staystext-lg. - The breakdown is the bar's legend. Each label gets a dot in its segment's colour (
bg-inverse/bg-subdued/bg-successorbg-destructive). The due and reserved figures drop totext-sm text-secondary. The safe/short figure keeps its tone and weight. - Dots only for segments on the bar. A figure whose segment isn't on the bar gets no dot, because a dot with no matching segment would be a false key. In a short period the bar is "covered" plus "short", so only "short" gets a dot. The grey covered part stays unlabelled, as before this change, and the bar's
aria-labelstill spells out the split. - The bar is taller. It goes from
h-0.5toh-1.5, so it reads as a chart. - Phone layout. At 375px the dot gutter made the labels truncate, so labels now wrap. Figures indent past the dot and sit at the foot of their column, so all three columns line up whether or not they have a dot.
_paycheck_income.html.erb is unchanged.
Screenshots
Before on the left, after on the right.
Desktop, light

Desktop, dark

375px, light

375px, dark

Validation
- A new controller test checks that, for every period, the legend dots are exactly the bar's segment colours, in order. It failed before the view change and passes after.
bin/rails test: 10,330 runs, 0 failures, 0 errors.- Bills system tests:
bills_mobile,find_my_billsandrecurring_transaction_frequencyare green.declare_and_pay_bill_testerrors withRecordNotFoundon a date-dependent occurrence. It errors the same way with the base view frommain, so this change didn't cause it. - erb_lint, RuboCop, Biome and Brakeman (0 warnings) are all clean.
Summary by CodeRabbit
- Improvements
- Paycheck allocation bars are taller, and safe or short amounts are more prominent.
- Allocation breakdowns retain consistent spacing when segments are absent, and labels wrap instead of truncating.
- Segment colors now match their legend swatches.