Skip to content

feat: added restricted country functionality #1171

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sundasnoreen12
Copy link
Contributor

Description

We are introducing a feature that allows platform administrators to restrict users from selecting one or more countries in Profile MFEs.

How Has This Been Tested?

We retrieved the list of restricted countries by calling the following API:

👉 https://courses.edx.org/user_api/v1/account/registration/

At the same time, we obtained the translated country names using the i18n-iso-countries package.

Once both datasets were available, we filtered out the restricted countries from the translated list and displayed the updated country list in the UI.

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Sandbox, if applicable.
  • Is there adequate test coverage for your changes?

Post-merge Checklist

  • Deploy the changes to prod after verifying on stage or ask @openedx/2u-infinity to do it.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@sundasnoreen12 sundasnoreen12 requested a review from a team as a code owner February 24, 2025 08:37
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 57.69231% with 11 lines in your changes missing coverage. Please review.

Project coverage is 66.43%. Comparing base (933a177) to head (893a39b).

Files with missing lines Patch % Lines
src/profile/data/services.js 0.00% 10 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1171      +/-   ##
==========================================
- Coverage   66.90%   66.43%   -0.47%     
==========================================
  Files          51       51              
  Lines         855      876      +21     
  Branches      179      183       +4     
==========================================
+ Hits          572      582      +10     
- Misses        272      282      +10     
- Partials       11       12       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sundasnoreen12 sundasnoreen12 changed the title feat: added country functionality feat: added restricted country functionality Feb 24, 2025
@sundasnoreen12 sundasnoreen12 force-pushed the sundas-restricted-country branch 3 times, most recently from 7413502 to a0c3ef7 Compare February 24, 2025 09:50
@sundasnoreen12 sundasnoreen12 force-pushed the sundas-restricted-country branch from a0c3ef7 to 893a39b Compare February 24, 2025 09:50
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.

3 participants