Skip to content

Household picker: common inputs first, topics, one entity per search - #1319

Merged
PavelMakarchuk merged 10 commits into
mainfrom
fix/v3-household-search-row
Oct 19, 2026
Merged

PavelMakarchuk merged 10 commits into
mainfrom
fix/v3-household-search-row

Conversation

@PavelMakarchuk

@PavelMakarchuk PavelMakarchuk commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What changes

  • Picker dialog (VariablePickerDialog): in the v3 household tab, "Add variable" opens a centered dialog of a standard size. It opens on Featured: up to nine common inputs listed by name (rent, self-employment income, tips, unemployment, Social Security, pension, interest, medical expenses; for the household: child care, utilities, mortgage, assets, vehicles). Under them, the inputs related to the reform.
  • Related to this reform: traced at most 4 steps upstream of the changed parameters; state programs' own inputs and filing flags left out; common inputs first; cut to size after the person/household split; no list for one lone input, or when the report finds the reform changes nothing in its year.
  • Topics: a column with an icon per topic (tiles on a phone). A topic lists its inputs by name, one line each, under its parts (Income → wages and work, self-employment and business, investments, retirement, other).
  • Search: a search lists its matches by name. The input under the pointer (or reached with the arrow keys) is described once, in a footer.
  • One entity per search: a person's search lists person inputs only; the household's lists the group entities' inputs only (household, tax unit, SPM unit, family, marital unit — one of each in the builder). Inputs the person or household already has are left out.
  • Left out (v3): SPM-unit survey totals, CBO incidence inputs, *_reported amounts and deprecated inputs.
  • Descriptions: the model documents only 4 of the 21 featured inputs (Document input variables: 613 of 925 inputs have no documentation, including the most-used household inputs policyengine-us#10275). Each featured input now carries a one-line description, shown in the footer and as the field label's hover text; the model's documentation wins where it exists. The footer also says what kind of value every input takes ("Dollars per year", "Yes or no", "Number").
  • Field names: added fields take the picker's short names, and a stacked label keeps to one line (full name on hover), so fields stay aligned.
  • Alignment: in the household form (columns layout), the search no longer sits in the fields' row without a label.

v2 pages: the dropdown opens the picker only where groupOf is passed; only the v3 household tab passes it. The inline list is unchanged.

Tests

  • VariablePickerDialog.test.tsx: tiles, topics with parts, search, the description footer, related inputs.
  • HouseholdBuilderForm.test.tsx: each search lists its own entity's inputs.
  • householdVariableGroups.test.ts: income parts, inputs left out.
  • Checked in the preview: person card and household, desktop and phone widths; a pick adds the variable.

🤖 Generated with Claude Code

The variable search's categories were one line of pill buttons that
scrolled sideways. They are now a column beside the list, every
category in view with its count; on a phone, one category choice above
the list.

In the report's household form, the open search takes the add link's
place on a line of its own under the fields. Its width cap alone kept
it in their row, where it had no label and sat above their boxes. On a
phone the fields' block no longer grows wider than the screen when the
list opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policyengine-calculator-next Ready Ready Preview Oct 19, 2026 1:29pm UTC
policyengine-website Ready Ready Preview Oct 19, 2026 1:29pm UTC

Request Review

In a narrow person card the list was as wide as the search box, so the
category column left no room for the variables. The grouped list now
opens as a panel over the page, up to 40rem wide and kept on screen,
at a fixed height so it does not move when a category changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ount

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The floating list still took its size from where it opened. The grouped
search is now a dialog of a standard size (up to 56rem wide, 40rem
tall, kept inside the screen), centered over the page: its title names
who the variable is for, the search sits in its header, and the
category column and the list fill the rest. Picking a variable adds it
and closes the dialog; Esc, the close button or a click outside closes
it too. The plain list (v2) is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk changed the title Household search: categories as a column, search on its own line Household search: a centered dialog with a category column Oct 19, 2026
…ts left out

- searchByEntity (opt-in): a person's search lists person inputs only;
  the household's lists every group entity's (household, tax unit, SPM
  unit, family, marital unit, one of each in the builder). With every
  row the search's own entity, the per-row Person/Household badge goes.
- A chosen category with parts reads part by part: Income splits into
  wages and work, self-employment and business, investments,
  retirement and other income, each in label order.
- v3 leaves out inputs that do not describe a household: SPM-unit
  survey totals, CBO incidence inputs, reported amounts and deprecated
  inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed below

Each row's description made the list a wall of text. Rows are now one
line, the variable's name. The row under the pointer, or the one the
arrow keys reach, is described once, in a footer under the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The variable dialog opens on what most households need: up to nine
common inputs as tiles with short names and icons (rent, self-employment
income, tips, unemployment, Social Security, pension, interest, medical
expenses; child care, utilities, mortgage and assets for the household),
then the reform's related inputs. Topics, each with an icon, sit in a
column beside it (tiles on a phone). A topic lists its inputs by name,
one line each, part by part; a search lists its matches. The input
under the pointer is described once, below the list.

The dialog is its own component, VariablePickerDialog, which the
dropdown opens when given groups; the inline list (v2) is unchanged.
A scoped search also leaves out inputs the person or household already
has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk changed the title Household search: a centered dialog with a category column Household picker: common inputs first, topics, one entity per search Oct 19, 2026
…t view is Featured

A stacked field's label wrapped to two lines when the model's label was
long, pushing its box below its neighbours'. Stacked labels now keep to
one line (the full name on hover), and the builder's fields take the
picker's short names (Child care expenses, not Spm unit pre subsidy
child care expenses). The picker's first view is called Featured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…something

- Featured lists its inputs by name, in the same rows as a topic, with
  no tiles or icons.
- Related to this reform: the trace stops 4 steps upstream (past that,
  every input reaches a tax credit through AGI), leaves out state
  programs' own inputs and filing flags, ranks common household inputs
  first, and is cut to size after the person/household split. One lone
  related input shows no list.
- A reform the report finds changes nothing in its year suggests no
  inputs (report 4571: the CTC's 17-and-over bracket, which no child
  qualifies for).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e each takes

The model documents only 2 of the 17 featured inputs. Each featured
input now carries a one-line description of what to enter, shown in
the picker's footer and as the field label's hover text; the model's
own documentation wins where it has one. The footer also says what
kind of value an input takes, from its unit, type and period
("Dollars per year", "Yes or no", "Number"), for every input.

Variable metadata now carries its definition period.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – policyengine-calculator-next — 31e23345 Deployed Oct 19, 2026 by vercel[bot]
Preview – policyengine-website — 31e23345 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant