Skip to content

fix(SDK-1143): render account_number metadata.prefix as input adornment - #2569

Merged
dmortal merged 1 commit into
mainfrom
fix/sdk-1143-tax-account-number-prefix
Aug 18, 2026
Merged

fix(SDK-1143): render account_number metadata.prefix as input adornment#2569
dmortal merged 1 commit into
mainfrom
fix/sdk-1143-tax-account-number-prefix

Conversation

@dmortal

@dmortal dmortal commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

account_number tax requirement fields reused the plain text input and silently dropped metadata.prefix, unlike Rails' TaxRequirements::InputBuilder::AccountNumber, which prepends a fixed input-group prefix ahead of the masked value (e.g. some tax agencies use an account number that is a company's EIN plus two digits — prefix XXXXX1234 + mask ##).

Changes

  • TextInput (used by QuestionInput for account_number and text question types) now reads requirement.metadata.prefix and passes it through as adornmentStart, mirroring how mask is already applied
  • Removed the now-resolved //TODO: temporary - need special handling for account numbers comment

Demo

Storybook: UI/Form/Fields/TaxInputsAccountNumberWithPrefix shows XXXXX1234 rendered as a fixed prefix ahead of the masked input; AccountNumberWithoutPrefix confirms the (more common today) prefix: null case is unchanged.

Related

Testing

  • npm run test -- --run src/components/Common/TaxInputs/TaxInputs.test.tsx — 2 new tests covering account_number with a non-null prefix (renders as start adornment) and with prefix: null (unaffected, matches all real fixtures seen today)
  • npm run test -- --run src/components/Company/StateTaxes — 57 existing tests pass, no regressions in the consuming RequirementFields/StateTaxesForm flow
  • npx tsc --noEmit and eslint clean
  • Manually verified in Storybook (UI/Form/Fields/TaxInputs)

account_number tax requirements reused the plain text input and silently
dropped metadata.prefix, unlike Rails' TaxRequirements::InputBuilder which
prepends it as a fixed input-group prefix. TextInput now passes prefix
through as adornmentStart, matching how mask is already applied.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dmortal
dmortal marked this pull request as ready for review August 14, 2026 20:02
@dmortal
dmortal requested a review from a team as a code owner August 14, 2026 20:02
@serikjensen

Copy link
Copy Markdown
Member

Feels like some UX @aaronlee777 might have interest in verifying?

@dmortal
dmortal added this pull request to the merge queue Aug 18, 2026
Merged via the queue into main with commit c0d669d Aug 18, 2026
40 checks passed
@dmortal
dmortal deleted the fix/sdk-1143-tax-account-number-prefix branch August 18, 2026 13:42
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.

2 participants