Full initial prototyped implementation of inline address autocomplete behind feature flag#13222
Draft
nidhi-stripe wants to merge 3 commits into
Draft
Full initial prototyped implementation of inline address autocomplete behind feature flag#13222nidhi-stripe wants to merge 3 commits into
nidhi-stripe wants to merge 3 commits into
Conversation
Contributor
|
Diffuse output: APKDEXARSC |
… behind debug feature flag
39f3e69 to
123b1ec
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
Prototype inline Google Places autocomplete for the Address Element. Instead of opening a full-screen autocomplete screen, users can type in the condensed address field and see suggestions in a dropdown.
Gated behind a Feature Flag: inlineAddressAutocomplete. Production behavior is unchanged, existing full-screen autocomplete still runs when the flag is off.
Motivation
The Address Element currently uses a full-screen autocomplete flow when a Google Places API key is configured. This prototype explores an inline UX, typing directly in the address field with dropdown suggestions to evaluate whether it improves the address collection experience. Because this is a prototype, it is intentionally behind a debug feature flag so we can iterate in the playground without affecting merchants.
Testing
Unit tests (
InputAddressViewModelTest):onQueryChangedguard rails (short query, unsupported country, emptyautocompleteCountries)onPredictionSelectedfetches place details and populates address fieldsManual verification (playground):
paymentsheet-exampledebug buildRecording
Recording Link
Changelog