feat: "Your share" tab: the answer on the first screen, details behind open-and-close rows
Back to our planProblem
The "Your share" tab makes a neighbor scroll about three screens before it answers its own question. The bill is drawn twice (a pie and a bar), the estimator sits between two sets of results, and the context a reader needs first comes last. The status shown also disagrees with itself in places.
Owner's decision (2026-11-11, chat session, after reviewing a mockup): rebuild the tab's order so the first phone screen holds the answer, and fold the secondary details behind open-and-close rows, without dropping any of them. He accepted that this reverses two earlier choices: results now change below the value box (#1068 put them above it), and the pie leaves this tab.
Proposed fix
A whole-bill tab is drawn in this order, top to bottom, the same on a phone and a desktop (one column that may widen; no side-by-side cards that change the reading order):
- Heading and one intro line from the tab's existing fields (the tab heading, and the bill block's intro line). No new CMS field.
- The estimator (compact card from the estimator issue).
- The answer card: the City's tax for the home last estimated and the year chosen, as the largest text on the tab; under it the City's increase for a year and for a month (the same figures the tab's
{yearly}and{monthly}use, so they always agree); the certainty badge once; one small line with the home value used and the City's share of the whole bill. - The whole bill: the total, one bar whose slices are as wide as their shares, and the receipt rows (color, name, percent, dollars) in the order City, schools, county, college. The bar and the rows use the same order. The pie is not drawn.
- Three open-and-close rows using the kit's
Disclosure, closed by default:- where the City's share goes (the tab's breakdown chart, with its estimate badge and its "smaller pieces" row),
- how the estimate works (the rough-estimate notes that used to sit in the estimator card, and the tab's short text),
- sources (each source once).
- Any other pictures of the tab follow, as today.
Everything that counts today still counts: a new home value over the long count, a new year over the short one, the total flash, the screen-reader status line, and no count with reduced motion. The page must not change height when a note appears or a year is chosen.
Remove what the new order makes unused (the pie's use here; the joined City panel under the bar), and delete code only where nothing else uses it.
Acceptance criteria
- Not done: Failing tests first for the new order, the answer card's figures (they equal the tab's
{yearly}and{monthly}for the same home and year) and the closed-by-default rows. - Not done: At 390×844 the heading, estimator, answer card, whole bill and the three closed rows fit without scrolling, with the average home loaded.
- Not done: On a phone with the keyboard open, the answer card is visible while the value is typed and when it is confirmed; the page does not jump.
- Not done: The bar and the receipt list the bodies in the same order, and every slice is named in the receipt; nothing is told by color alone.
- Not done: Each source appears once on the tab. The status (certainty badge and year note) appears once and comes from the stored data, never from a literal.
- Not done: Opening a row never moves what is above it; the rows work with scripting off.
- Not done: No information the tab shows today is lost: each item is either on the first screen or inside one of the three rows.
- Not done: Visual design review at the standard widths in light and dark; rows and columns stay aligned, and text is shortened or stacked before it wraps out of line.
- Not done: The rich text note describes the new order and behavior in the same PR; unused code and tests for the pie's use here are removed.
Files likely touched
src/platform/richtext/editorial/BillShare.client.tsxand its tests (BillShare*.test.tsx)src/platform/richtext/editorial/billShareView.ts,shareBarView.ts,billShareNotes.ts,billFigures.tssrc/platform/richtext/editorial/FactTabs.tsx(only the order of a whole-bill panel)src/platform/ui/ShareBar.client.tsx,src/platform/ui/SharePie.client.tsx(remove only if unused)src/platform/richtext/README.md,docs/ui/component-set.md
Must not touch
src/platform/ui/Field.client.tsxandRoughEstimator.tsxbeyond passing props (the estimator issue owns them)src/platform/ui/Tabs.client.tsx,src/platform/richtext/editorial/FactCard.tsx(the tab buttons issue owns them)- The stored tax years and rates (#594) and any CMS field
Open questions
None.
Generated by Claude Code, opens in a new tab