Skip to content

feat: implement country and state selection enhancements#2538

Merged
Patryk Tomczyk (patzick) merged 10 commits into
mainfrom
feat/smart-country-select
Jul 15, 2026
Merged

feat: implement country and state selection enhancements#2538
Patryk Tomczyk (patzick) merged 10 commits into
mainfrom
feat/smart-country-select

Conversation

@mdanilowicz

Copy link
Copy Markdown
Contributor

This pull request introduces a new, smart country picker component with flag icons, search, and keyboard navigation, and integrates it into registration, address, and checkout forms. It also improves form validation by requiring the state field only for countries that have states. The most important changes are grouped below:

New Smart Country Picker Component

  • Added FormCountrySearchSelect, a searchable and paginated country picker with flag icons, keyboard navigation, and single-country mode.
  • Added supporting subcomponents: CountrySearchSelect/Flag.vue for country flags and CountrySearchSelect/Option.vue for selectable country options. [1] [2]

Form Integration and Validation Updates

i18n and User Feedback Improvements

  • Added new i18n strings for country search loading, errors, and empty states in English, German, and Polish. [1] [2] [3]

Component and API Refactoring

  • Refactored CountryStateInput.vue to use the new country picker and emit state changes, removing dependency on the old getCountriesOptions and getStatesForCountry helpers. [1] [2]

Type and Prop Updates

  • Updated prop and type usage in affected components to support the new country picker and validation logic. [1] [2] [3]

These changes modernize the country selection experience, improve accessibility and validation, and lay groundwork for further enhancements.

@patzick Patryk Tomczyk (patzick) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's just use readCountryGet instead of post endpoint for it

@mdanilowicz

Copy link
Copy Markdown
Contributor Author

let's just use readCountryGet instead of post endpoint for it

There is a function with both endpoints https://github.com/shopware/frontends/pull/2538/changes#diff-ba1eab2c1da44e2c9950440ab7f84f59de5385448f23e48b8727c2b404080b12R129 invokeCountrySearch

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontends-starter-template-extended Ready Ready Preview, Comment Jul 15, 2026 5:55pm
frontends-vue-starter-template Ready Ready Preview Jul 15, 2026 5:55pm

Request Review

@patzick Patryk Tomczyk (patzick) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one question and one thing to improve

@patzick
Patryk Tomczyk (patzick) merged commit b4c409c into main Jul 15, 2026
10 checks passed
@patzick
Patryk Tomczyk (patzick) deleted the feat/smart-country-select branch July 15, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants