Skip to content

NumberForm migration batch 4: simple text and unit inputs #98176

Open

Description

@mountiny

Sub-issue of #97970.
Migration plan: jmgraa comment.

Fourth migration batch. Four leaf call sites that need NumberForm with Input and only the children they actually use. This is the batch that exercises the displayAsTextInput path, which has no coverage on main.

Scope

  • Step: 5 of the migration plan, simple text and unit inputs
  • Shape: plain input, no number pad
  • Scope: 4 files, plus 1 test comment update

Files

  • src/pages/iou/request/step/IOURequestStepHours.tsx:165 — direct render, ref type at :81. Unit suffix hrs.
  • src/pages/workspace/taxes/WorkspaceCreateTaxValuePage.tsx:75 — direct render, isSymbolPressable={false}
  • src/components/MoneyRequestConfirmationList/sections/TaxFields.tsx:163 — direct render, displayAsTextInput, ref type at :54
  • src/components/MoneyRequestConfirmationList/sections/AmountField.tsx:312 — direct render, displayAsTextInput with both shouldShowFlipButton and shouldShowCurrencyButton
  • tests/ui/IOURequestStepHoursTest.tsx:158,184 — comment update only. It mentions NumberWithSymbolForm in two comments but does not import it. Update the comments so they name the composition.

AmountField is the hard one

src/components/MoneyRequestConfirmationList/sections/AmountField.tsx is the only call site in the codebase that uses the displayAsTextInput right hand side buttons. It is therefore the only real test of the NumberForm.FlipButton and NumberForm.CurrencyButton primitives from #98170 in that layout. Migrate it last within this batch and give it its own verification note in the PR.

In the old component that path resolved its trailing button through onTrailingDropdownPress = onCurrencyButtonPress ?? onSymbolButtonPress at line 243, and negated through the internal handleFlipPress rather than the caller supplied toggleNegative. Confirm the new primitives reproduce both.

Coverage note

Neither AmountField nor TaxFields renders in any test today. tests/ui/SubmitDetailsPageTest.tsx mocks @components/MoneyRequestConfirmationList entirely, so the confirmation list subtree never mounts. Manual verification is the only check for these two, unless this PR adds a test.

Out of scope

Acceptance criteria

  • All 4 files render the NumberForm composition with only the children they need
  • No file in this batch imports NumberWithSymbolForm
  • AmountField.tsx reproduces the trailing button and the negation behaviour of the old displayAsTextInput path, with the verification stated in the PR
  • WorkspaceCreateTaxValuePage.tsx keeps its non pressable symbol
  • tests/ui/IOURequestStepHoursTest.tsx passes and its comments name the composition
  • The seatbelt rows for all 4 files are removed
  • Manual pass over the hours step, tax value creation, and the confirmation list amount and tax fields
  • Verify that no errors appear in the JS console

Dependencies

Issue OwnerCurrent Issue Owner: @bernhardoj

Activity

  1. added
    Weekly
    Skip Payment
    on Aug 10, 2026
  2. added and removed
    Weekly
    on Sep 2, 2026
  3. melvin-bot commented on Sep 2, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @mountiny, @bernhardoj eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  4. expensify-chore-bot commented on Nov 17, 2026

    @expensify-chore-bot

    @mountiny, @bernhardoj, this Monthly task hasn't been acted upon in 6 weeks; closing.

    If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

  5. added
    Reviewing
    Weekly
    and removed on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Not a priorityReviewingSkip PaymentTaskWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions