Extract BillingAddressElement configuration - #13782
Draft
cttsai-stripe wants to merge 1 commit into
Draft
Conversation
3 tasks
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-form-factory-base-elements
branch
from
August 6, 2026 18:17
f2d9933 to
f816960
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-billing-address-configuration
branch
from
August 6, 2026 18:17
37c2556 to
7d9a4ea
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-form-factory-base-elements
branch
from
August 6, 2026 20:22
f816960 to
c67b48e
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-billing-address-configuration
branch
from
August 6, 2026 20:22
7d9a4ea to
8b2e4ec
Compare
Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-form-factory-base-elements
branch
from
August 6, 2026 22:38
c67b48e to
5e52aaa
Compare
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-billing-address-configuration
branch
from
August 6, 2026 22:38
8b2e4ec to
7bc9901
Compare
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
Extracts
BillingAddressElement.Configuration, an immutable value holder for the static inputs used to construct a billing-address element.CountrySpeccallers without changing their inputs.DropdownFieldControllerandSameAsShippingElementas constructor inputs because they own live form state.Motivation
#13713 needs to replace a billing-address element when automatic tax widens a country-only form. A copyable configuration makes that replacement explicit without mutating an element whose nested address and section controllers have already captured live state.
The
CountrySpecpath continues to initialize its controller frominitialValues[spec.apiPath]. Card and standalone billing-details paths continue to useIdentifierSpec.Country.This is behavior-neutral prework between #13737 and #13713. It intentionally does not add
withAdditionalFields(), automatic-tax constants, gates, or finalization.CountrySpecTransformSpecToElementsTestIdentifierSpec.Countryinitial value.CardDefinitionTestBillingDetailsFormTestTesting
Passed:
./gradlew :payments-ui-core:testDebugUnitTest --tests com.stripe.android.ui.core.elements.CardBillingAddressElementTest./gradlew :paymentsheet:testDebugUnitTest --tests com.stripe.android.lpmfoundations.luxe.TransformSpecToElementsTest --tests com.stripe.android.lpmfoundations.paymentmethod.definitions.CardDefinitionTest --tests com.stripe.android.paymentsheet.ui.BillingDetailsFormTest./gradlew :payments-ui-core:lintRelease :payments-ui-core:detekt :payments-ui-core:apiCheck :paymentsheet:detekt :paymentsheet:apiCheckScreenshots
Not applicable. The rendered form behavior is unchanged.
Changelog
Not applicable. This is an internal behavior-neutral refactor.