Skip to content

feat: add PrimerBillingAddressForm and form-state providers (ACC-6921)#355

Draft
OnurVar wants to merge 1 commit intoov/feat/ACC-6916-set-billing-addressfrom
ov/feat/ACC-6921-billing-address-form
Draft

feat: add PrimerBillingAddressForm and form-state providers (ACC-6921)#355
OnurVar wants to merge 1 commit intoov/feat/ACC-6916-set-billing-addressfrom
ov/feat/ACC-6921-billing-address-form

Conversation

@OnurVar
Copy link
Copy Markdown
Contributor

@OnurVar OnurVar commented Apr 24, 2026

Summary

  • Adds PrimerBillingAddressForm — controlled public component with country row + first/last name + address1/2 + postal/city + state fields.
  • Adds useBillingAddressForm hook backed by a BillingAddressFormStateProvider so form state survives nav transitions.
  • Refactors useCardForm to read from a matching CardFormStateProvider (same lifecycle reason).
  • Exposes setBillingAddress on PrimerCheckoutContextValue; the form debounces writes through it.
  • Integrates billing section into CardFormScreen: card form → divider → billing section → shared Pay.

Out of scope (follow-ups)

  • Country selector screen lives in ACC-7226 (stacked on this branch). The row here navigates to the route, but the screen is mounted there.
  • Per-field gating via checkoutModules — ACC-7224 (iOS bridge) + ACC-7225 (Android bridge) first.

Jira

https://primerapi.atlassian.net/browse/ACC-6921

Test plan

  • `yarn typecheck` clean
  • `yarn lint` exit 0
  • `yarn test` — 104 tests pass (same baseline)
  • iOS simulator: drop-in flow → card form shows billing section → fill fields → Pay enables when card + billing both valid
  • Android emulator: same

@OnurVar OnurVar self-assigned this Apr 26, 2026
@OnurVar OnurVar force-pushed the ov/feat/ACC-6916-set-billing-address branch from 2138a60 to 778c8cf Compare April 27, 2026 01:21
@OnurVar OnurVar force-pushed the ov/feat/ACC-6921-billing-address-form branch from fe52337 to 2b93479 Compare April 27, 2026 01:21
@OnurVar OnurVar force-pushed the ov/feat/ACC-6916-set-billing-address branch from 778c8cf to 9af58ca Compare April 27, 2026 01:40
@OnurVar OnurVar force-pushed the ov/feat/ACC-6921-billing-address-form branch from 2b93479 to e495b25 Compare April 27, 2026 01:41
@OnurVar OnurVar force-pushed the ov/feat/ACC-6916-set-billing-address branch from 9af58ca to 28a874a Compare April 27, 2026 01:50
@OnurVar OnurVar force-pushed the ov/feat/ACC-6921-billing-address-form branch from e495b25 to d3e4c8b Compare April 27, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant