-
Notifications
You must be signed in to change notification settings - Fork 834
Forms: add combobox for phone country selector #45120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…country selection on inspector controls
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 6 files. Only the first 5 are listed here.
2 files are newly checked for coverage.
Full summary · PHP report · JS report Coverage check overridden by
Coverage tests to be added later
|
This reverts commit ad39a2a.
* adapt process to use two letter country code, derive state from it * remove debugging code * remove field-phone registration and handlers * deprovision default when not using country selector on phone field * cleanup useless code * use the right field type for international phone number: phone * remove field-phone registration and handlers * temp, working forwards * migrating to interactivity, wip * fully working, needs cleanup and styling * clean up code and styles * switch to probe styles specific to background colors * fix some failing styles * use new initialization and dom listener * remove old actions, use more consistent naming * add arrow navigation for dropdown * update test after new markup * show country toggle on toolbar * forgotten context consumer declaration * poc: use just flag and trunk on block, provide more complete default country selection on inspector controls * fix searchterm being case sensitive * scroll country list to top when searching * allow arrow key navigation and selection even when there is no search term * arrow key navigation selects and scrolls to country * use pseudo element for down arrow, fix a couple of inconsistent styles * fix indentation * remove unused styling * make phone input look better with animated and outlined styles * minor style/class fixes * changelog * split combobox to shared component, add handlers * add navigation to combobox on editor * make it a bit more agnostic * allow enter to select the first option if the user has performed a search * address PR comments * inherit background color so input background is honored, but it's tricky, needs testing * adjust colors to inherit from current * address more PR comments * need to rebuild css class names as they come with 'class=' attached, including quotes * fix test for phone input * use provided styles for dropdown * address bug with calculated probe styles: use browser default 1.2 instead of 'normal' * address width and positioning issues * fix styles colliding with defaults, use presets for color highlight * use fallback color as it's more reliable than the detected background * change down arrow, use svg instead of pseudo element * use detected radius style when possible * fix animated and outlined styles on combobox * use safe background color to avoid falling into transparent * inherit styles from block props * fix some quirks on editor styles to match frontend * fix @SInCE docblock for next version * add Jetpack changelog
Second attempt after reverted #45018
Phone field with country selector, second iteration.
Proposed changes:
This PR implements a searchable dropdown for the country selector on the phone field.
Working on the editor:
Screen.Recording.2025-09-05.at.16.14.53.mov
Working on the frontend:
Screen.Recording.2025-09-05.at.16.16.01.mov
NOTE: the default country setting on the inspector sidebar can remain as a secondary way of setting it or we can remove it all along. It doesn't look as nice, but as a setting it also makes sense to leave it there.
Other information:
Jetpack product discussion
None
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Test: