fix(SDK-1143): render account_number metadata.prefix as input adornment - #2569
Merged
Conversation
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
marked this pull request as ready for review
August 14, 2026 20:02
serikjensen
approved these changes
Aug 17, 2026
Member
|
Feels like some UX @aaronlee777 might have interest in verifying? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
account_numbertax requirement fields reused the plain text input and silently droppedmetadata.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 — prefixXXXXX1234+ mask##).Changes
TextInput(used byQuestionInputforaccount_numberandtextquestion types) now readsrequirement.metadata.prefixand passes it through asadornmentStart, mirroring howmaskis already applied//TODO: temporary - need special handling for account numberscommentDemo
Storybook:
UI/Form/Fields/TaxInputs—AccountNumberWithPrefixshowsXXXXX1234rendered as a fixed prefix ahead of the masked input;AccountNumberWithoutPrefixconfirms the (more common today)prefix: nullcase is unchanged.Related
Testing
npm run test -- --run src/components/Common/TaxInputs/TaxInputs.test.tsx— 2 new tests coveringaccount_numberwith a non-nullprefix(renders as start adornment) and withprefix: null(unaffected, matches all real fixtures seen today)npm run test -- --run src/components/Company/StateTaxes— 57 existing tests pass, no regressions in the consumingRequirementFields/StateTaxesFormflownpx tsc --noEmitandeslintcleanUI/Form/Fields/TaxInputs)