Skip to content

NumberForm foundation 4: deprecate NumberWithSymbolForm, add eslint guard and migration guide #98172

Open

Description

@mountiny

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

The composition API is usable after #98171. This issue closes the door on the old one: it marks NumberWithSymbolForm deprecated, adds a lint guard so no new usages can land while migration is in flight, and writes the migration guide the five migration batches work from.

This is the gate. The migration batches #98173 to #98177 all unblock when this lands.

Scope

  • Step: 4 of the migration plan
  • Scope: deprecation markers, 1 eslint rule, 1 seatbelt baseline, 1 guide

Files

  • src/components/NumberWithSymbolForm.tsx — @deprecated on the component and its exported types
  • config/eslint/eslint.config.mjs — no-restricted-imports
  • config/eslint/eslint.seatbelt.tsv — baseline for the 14 files that import it today
  • contributingGuides/ — the migration guide

Deprecation guard

The migration plan has no guard, so new NumberWithSymbolForm call sites can land mid migration and silently extend the work. The Button decomposition solved this in its first batch and the same shape applies here:

  • Add no-restricted-imports for @components/NumberWithSymbolForm with importNames: ['default'] only, so NumberWithSymbolFormProps and NumberWithSymbolFormRef stay importable while the type only call sites migrate.
  • Seed the existing usage baseline into config/eslint/eslint.seatbelt.tsv. Current importers, verified on main:
src/components/AmountForm.tsx
src/components/Form/types.ts
src/components/MoneyRequestAmountInput.tsx
src/components/MoneyRequestConfirmationList/sections/AmountField.tsx
src/components/MoneyRequestConfirmationList/sections/TaxFields.tsx
src/pages/ChronosScheduleOOOPage.tsx
src/pages/iou/MoneyRequestAmountForm.tsx
src/pages/iou/request/step/DistanceManualTabContent.tsx
src/pages/iou/request/step/IOURequestStepDistance.tsx
src/pages/iou/request/step/IOURequestStepDistanceManual.tsx
src/pages/iou/request/step/IOURequestStepHours.tsx
src/pages/workspace/taxes/ValuePage.tsx
src/pages/workspace/taxes/WorkspaceCreateTaxValuePage.tsx
src/stories/NumberWithSymbolForm.stories.tsx

Also note config/eslint/eslint.seatbelt.tsv:275-276, which grandfathers one @typescript-eslint/no-unsafe-type-assertion and two react-hooks/set-state-in-effect against the component path. Those rows retire in #98178 together with the file.

Migration guide contents

  1. V1 prop to composition mapping. One table, every public prop, mapping to a primitive, a root prop, or nothing.
  2. Dead props map to nothing. Say so explicitly so nobody tries to preserve them:
    • onChangeAmount — accepted publicly but overridden internally at line 584. The Omit on the props type lists 'onAmountChange', which is a typo and therefore a no-op, which is why the prop is still visible.
    • selection — caller value ignored
    • rightHandSideComponent — caller value ignored, computed internally at line 576
    • prefixStyle — hardcoded to styles.colorMuted in the displayAsTextInput path at line 562, forwarded in the other two
    • shouldAllowFocusInLandscapeMode — hardcoded true at line 632
    • In the displayAsTextInput path roughly 32 of the public props have no effect at all, and the type signature does not say so.
  3. Direct composition examples, one per shape found in the call sites: currency amount, unit suffix, plain text input, Form registered input.
  4. Preset policy. Presets such as NumberFormDistance are not built ahead of time. Add one in the same PR as the first call site that needs the repeated pattern, and only when composing inline would otherwise copy the same structure.
  5. Verification expected per migrated call site. At minimum: the ref contract still works, both orientations render, touch and non touch both render, and the screen's own tests pass.

Out of scope

Acceptance criteria

  • @deprecated on NumberWithSymbolForm, NumberWithSymbolFormProps and NumberWithSymbolFormRef
  • no-restricted-imports blocks new default imports of @components/NumberWithSymbolForm
  • The type exports stay importable, so type only call sites can migrate later
  • Seatbelt baseline seeded for all 14 files listed above
  • Migration guide published with the prop mapping table, the dead prop list, one example per call site shape, the preset policy, and the per site verification checklist
  • Lint passes on main with the guard in place and no new violations
  • Verify that no errors appear in the JS console

Dependencies

Issue OwnerCurrent Issue Owner: @bernhardoj

Activity

  1. added
    Skip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.
    on Aug 10, 2026
  2. melvin-bot commented on Sep 2, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @mountiny, @bernhardoj, @jmgraa 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

MonthlyKSv2Skip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.Task

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions