SX-2130 Allow multiple countries with same country code
Addresses SX-2130.
Purpose
We are currently using the country code phone prefix (e.g. +49) as unique identifier of the country code select/input field.
However, the phone prefix is not unique given a list of countries (e.g. Canada and U.S. share the same country code: +1)
This PR is changing the value that is hold by the country code input/select field from the phone prefix to the country ISO code (e.g. US)
Approach and changes
Adapted the service and the component logic to consider the country code and not the phone prefix as the source of truth for the country code input/select field
Definition of done
- [x] Development completed
- [x] Reviewers assigned
- [x] Unit and integration tests
- [ ] Meets minimum browser support
- [ ] Meets accessibility requirements
π¦ Changeset detected
Latest commit: 5592dc4b6b3cbe1b82d5e38ce266171c3a0566c1
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 2 packages
| Name | Type |
|---|---|
| @sumup/circuit-ui | Minor |
| @sumup/eslint-plugin-circuit-ui | Major |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Deployment failed with the following error:
You don't have permission to create a Preview Deployment for this project.
View Documentation: https://vercel.com/docs/accounts/team-members-and-roles
Codecov Report
Attention: Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.
Project coverage is 86.75%. Comparing base (
7fce1de) to head (5592dc4). Report is 1 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...i/components/PhoneNumberInput/PhoneNumberInput.tsx | 88.23% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #2586 +/- ##
==========================================
- Coverage 86.76% 86.75% -0.01%
==========================================
Files 210 210
Lines 12056 12065 +9
Branches 1520 1524 +4
==========================================
+ Hits 10460 10467 +7
- Misses 1543 1545 +2
Partials 53 53
| Files with missing lines | Coverage Ξ | |
|---|---|---|
| ...onents/PhoneNumberInput/PhoneNumberInputService.ts | 84.84% <100.00%> (ΓΈ) |
|
| ...i/components/PhoneNumberInput/PhoneNumberInput.tsx | 89.81% <88.23%> (-0.53%) |
:arrow_down: |
The latest updates on your projects. Learn more about Vercel for Git βοΈ
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| oss-circuit-ui | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Oct 15, 2024 3:47pm |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Add a comment explaining why the pull request is still relevant to prevent it from being closed.
@roma-claudio Do you want to address the review comments yourself, or would you mind if we take over the PR to finish it?
@roma-claudio Do you want to address the review comments yourself, or would you mind if we take over the PR to finish it?
@connor-baer - I'm planning to work on it this Friday.
If you have a urgent deadline to be met before that I'm happy with somebody else taking it over (as I don't have capacity before)
@connor-baer - I've accepted the suggested changes ππ»