feat(signup): country picker for the phone number - #330
Merged
Merged
Conversation
DialingCountries maps every region to its country calling code, splits a pasted international number back into country and national part, and drops a trunk 0 where it is not part of the number (Italy and Côte d'Ivoire keep theirs). Names are left to the platforms' locale data. deviceRegionCode() gives the picker its starting country. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds the picker's title, search prompt, empty state and button label, and a read-back line for the full number, in all eleven languages. The hint no longer asks for a country code, and the +31 placeholder goes: both described typing the code by hand. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The number field used to require a hand-typed E.164 number, and a wrong one spends one of the two weekly SMS attempts. The ViewModel now holds a country (starting on the device region) beside the national number and joins them only for the wire; a number entered with its own + moves the picker rather than being prefixed twice. Android opens a searchable ModalBottomSheet from a flag-and-code button inside the field; iOS opens a List with .searchable in a sheet. Both search by name (case- and accent-insensitive), ISO code or calling code, and read the full number back once it is valid. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The SMS signup field used to require a hand-typed E.164 number, and a wrong one spends one of the two weekly SMS attempts. Now the user picks a country and types the number the way they normally would.
Shared
DialingCountries: every region and its calling code. It can split a pasted+44 …back into country + national part, and it drops a trunk0(except in IT/VA/SM/CI, where the 0 is part of the number).PhoneVerificationViewModelholdscountry(starting on the device region,deviceRegionCode()expect/actual) beside the national number, and joins them only ininternationalNumber. A number entered with its own+moves the picker instead of getting prefixed twice. The resumed-code path splits the stored number the same way.DialingCountriesTest(checks that no calling code is a prefix of another, trunk-zero rules, splitting) and a newPhoneVerificationViewModelTest.Android: a flag + code button inside the field opens a full-height, searchable
ModalBottomSheet. A dropdown menu doesn't work for ~240 rows, and it would sit under the keyboard.iOS: the same button opens a sheet with a
List+.searchable, the native pattern.Both search by name (ignoring case and accents), by ISO code, or by calling code. Names come from the platform's locale data. Once the number is valid, the hint reads it back in full ("We'll text +44 7700900123.").
Strings: 6 new keys in all 11 languages.
signup_phone_hintis reworded, andsignup_phone_placeholderis removed.Verification
detektAll,:shared:jvmTest,:shared:compileKotlinMetadata,checkStringPluralsand:androidApp:assembleDebugall pass.Pixel_Tabletin landscape and portrait. Results are injourneys/RESULTS.md.CountryPickerSheet.swift, thePhoneVerificationScreen.swiftchanges andRegion.ios.ktneed a Mac build and a pass of journey 27 before merging.🤖 Generated with Claude Code