circuit-ui icon indicating copy to clipboard operation
circuit-ui copied to clipboard

SX-2130 Allow multiple countries with same country code

Open roma-claudio opened this issue 1 year ago β€’ 3 comments

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

roma-claudio avatar Jun 28 '24 15:06 roma-claudio

πŸ¦‹ 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

changeset-bot[bot] avatar Jun 28 '24 15:06 changeset-bot[bot]

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

vercel[bot] avatar Jun 28 '24 15:06 vercel[bot]

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

Impacted file tree graph

@@            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:

codecov[bot] avatar Jun 28 '24 15:06 codecov[bot]

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

vercel[bot] avatar Jul 18 '24 10:07 vercel[bot]

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.

github-actions[bot] avatar Sep 17 '24 07:09 github-actions[bot]

@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 avatar Oct 09 '24 08:10 connor-baer

@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)

roma-claudio avatar Oct 09 '24 08:10 roma-claudio

@connor-baer - I've accepted the suggested changes πŸ‘πŸ»

roma-claudio avatar Oct 11 '24 10:10 roma-claudio