Skip to content

feat(IBAN): Automatic Bank Name identification and controlled form inputs#3694

Open
Spencer6497 wants to merge 27 commits into
mainfrom
iban-bank-name-refactor-RAST-477
Open

feat(IBAN): Automatic Bank Name identification and controlled form inputs#3694
Spencer6497 wants to merge 27 commits into
mainfrom
iban-bank-name-refactor-RAST-477

Conversation

@Spencer6497
Copy link
Copy Markdown
Contributor

This PR introduces a new pattern to forms: form inputs controlling other form inputs. In this example, when a user enters a valid IBAN that corresponds to an existing bank, the IbanInput field updates the bankName field with the matched name. This has wider application, for example, entering a Postleitzahl and automatically filling the city.

  • move BankNameBadge to its own file and hide for now
  • make TextInput potentially controlled, fix useEffect in IbanInput
  • add tests
  • add clarifying comment to controlled prop, comment out bank name badge logic
  • add accessibility features

Copy link
Copy Markdown
Contributor

@aaschlote aaschlote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few comments — this looks promising overall. I think there are still some improvements we could make, but we can address them later after discussing the comments below.

Comment thread app/domains/pageSchemas.ts Outdated
Comment thread app/domains/pageSchemas.ts Outdated
Comment thread app/domains/pageSchemas.ts Outdated
Comment thread app/domains/kontopfaendung/pkonto/antrag/pages.ts Outdated
Comment thread app/domains/kontopfaendung/pkonto/antrag/pages.ts Outdated
Comment thread app/domains/pageSchemas.ts Outdated
Comment thread app/components/formElements/inputs/iban/IbanInput.tsx Outdated
Comment thread app/domains/pageSchemas.ts
Comment thread app/components/hooks/__test__/useControlledField.test.tsx
@sonarqubecloud
Copy link
Copy Markdown

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