Skip to content
SprecherEast
Issue 1110

feat: Rough Estimator: a check-mark button inside the home value box

Back to our plan
Done
enhancementfrontendstylinguxpriority: mediumshared-componentready

Problem

In the Rough Estimator, the "Estimate" text button sits beside the home value box and reads as broken while it is disabled. On a phone it also takes a third of the row. Neighbors already know the pattern used by chat and search boxes: a small action button inside the box, at its end, that wakes up once there is something to send.

Owner's decision (2026-11-11, chat session, after reviewing a mockup): replace the text button with a check-mark icon button inside the value box, and label the box with the assessed value.

Proposed fix

  • UI kit Field: add a way to place the action inside the control's box at its trailing end, with the same inset above, below and at the end (a new option on the existing bar layout or a new layout; choose per "use, configure or split"). The box keeps one border and one focus ring around the control and the action together.
  • Rough Estimator:
    • The action becomes an icon button (lucide-react Check) with an accessible name that says what it does.
    • While the typed value is not a new valid number (canEstimate is false) the button is disabled, flat and muted.
    • Once it is a new valid number the button becomes enabled, takes the accent color and lifts slightly (a small shadow; no lift with reduced motion). The box's border takes the accent too.
    • Pressing it, or Enter or the keyboard's go key, estimates exactly as today (same count, same total flash). After the estimate the button is muted again.
    • The label reads "Your home’s assessed value".
    • The card becomes compact: no "Rough Estimator" title, and the tax-year buttons share the row with the value box where they fit (stack under it before anything wraps or clips).
    • The intro line and the notes are no longer drawn inside the card: the component stops taking them, and the whole-bill layout shows them elsewhere (the layout issue).
  • Behavior that must not change: typing changes nothing by itself, the error text for a value that is not a number, the tax-year buttons applying at once, the notes' wording.

Acceptance criteria

  • Not done: Failing tests first: the button is disabled until the value is a new valid number; enabled after; pressing it and Enter both call the estimate once; disabled again after the estimate.
  • Not done: The icon button has an accessible name and passes the axe check; its tap area meets the kit's minimum touch size even though the drawn square is smaller.
  • Not done: The inset between the button and the box's edge is equal on the top, bottom and trailing sides at 320, 390 and 1280 px wide.
  • Not done: Disabled and enabled states are told apart by more than color (elevation and contrast), in light and dark themes, from theme tokens only.
  • Not done: With reduced motion there is no lift animation.
  • Not done: The new Field option has its test, its gallery entry and its row in docs/ui/component-set.md.
  • Not done: The rich text note (src/platform/richtext/README.md) and the UI kit note describe the new behavior in the same PR.
  • Not done: Checked on a phone with the keyboard open: the box and the button stay in view.

Files likely touched

  • src/platform/ui/Field.client.tsx, src/platform/ui/Field.client.test.tsx
  • src/platform/ui/Button.tsx (only if an icon-only size or look is missing)
  • src/platform/richtext/editorial/RoughEstimator.tsx, RoughEstimator.test.tsx
  • src/app/(frontend)/dev/gallery/ (the Field entry)
  • docs/ui/component-set.md, src/platform/ui/README.md, src/platform/richtext/README.md

Must not touch

  • src/platform/richtext/editorial/BillShare.client.tsx beyond the props it passes to the estimator (the layout issue owns it)
  • src/platform/ui/Tabs.client.tsx, src/platform/richtext/editorial/FactCard.tsx (the tab buttons issue owns them)

Open questions

None.


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab