Skip to content
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

feat(ramp): popular region and search states #7899

Merged
merged 3 commits into from
Dec 1, 2023

Conversation

wachunei
Copy link
Member

@wachunei wachunei commented Nov 21, 2023

Description

This PR improves the Region selector for Ramp flows by removing duplicate code and adding these features:

  1. Default list is now shown in sections (Popular Regions and Regions)
  2. Searching will also match and display states

Related issues

Fixes: #

Manual testing steps

  1. Go to Ramp flow
  2. Open a Region modal (Region or Amount screens)
  3. Confirm the changes from descriptions

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@wachunei wachunei added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-ramp issues related to Ramp features labels Nov 21, 2023
@wachunei wachunei force-pushed the feat/ramp-recommended-regions branch from 1a263c8 to 8fb89f6 Compare November 21, 2023 21:31
@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2023

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (71321b3) 37.46% compared to head (70571f8) 37.45%.

Files Patch % Lines
...mponents/UI/Ramp/common/components/RegionModal.tsx 31.42% 15 Missing and 9 partials ⚠️
app/components/UI/Ramp/common/sdk/index.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7899      +/-   ##
==========================================
- Coverage   37.46%   37.45%   -0.02%     
==========================================
  Files        1052     1052              
  Lines       28202    28224      +22     
  Branches     2517     2524       +7     
==========================================
+ Hits        10566    10571       +5     
- Misses      17037    17048      +11     
- Partials      599      605       +6     

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

@wachunei wachunei marked this pull request as ready for review November 29, 2023 14:27
@wachunei wachunei requested a review from a team as a code owner November 29, 2023 14:27
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1a7b02be-03d2-420a-af67-734adf8ed4e9
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@wachunei wachunei added the needs-ramp-qa Tickets that need feature QA on the ramps flows label Nov 29, 2023
@bkirb
Copy link
Contributor

bkirb commented Nov 29, 2023

@wachunei LGTM I verified this change for regions ✅

@wachunei
Copy link
Member Author

wachunei commented Nov 30, 2023

@bkirb can you quickly verify again? by self reviewing I found an issue and I added a fix to avoid recomputing the fuzzy search engine on every keystroke

Copy link

sonarcloud bot commented Nov 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

50.8% 50.8% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

@wachunei wachunei removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Nov 30, 2023
@bkirb
Copy link
Contributor

bkirb commented Dec 1, 2023

@wachunei LGTM I verified with the latest changes ✅

@wachunei wachunei removed the needs-ramp-qa Tickets that need feature QA on the ramps flows label Dec 1, 2023
@wachunei wachunei merged commit 199aa40 into main Dec 1, 2023
28 checks passed
@wachunei wachunei deleted the feat/ramp-recommended-regions branch December 1, 2023 13:31
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2023
@metamaskbot metamaskbot added the release-7.14.0 Issue or pull request that will be included in release 7.14.0 label Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.14.0 Issue or pull request that will be included in release 7.14.0 team-ramp issues related to Ramp features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants