Skip to content

refactor: remove unused styles and simplify PhoneCountrySelectorModal…#33350

Merged
meltingice1337 merged 2 commits into
mainfrom
fix/TRAM-3579
Jul 15, 2026
Merged

refactor: remove unused styles and simplify PhoneCountrySelectorModal…#33350
meltingice1337 merged 2 commits into
mainfrom
fix/TRAM-3579

Conversation

@meltingice1337

@meltingice1337 meltingice1337 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

Simplifies the layout of PhoneCountrySelectorModal in the Ramp flow. The country row was previously built from a custom ListItemColumn + nested View/Text composition with a dedicated stylesheet. It now uses the built-in ListItemSelect props instead: startAccessory for the flag emoji, title for the country name, and description for the phone prefix.

This removes PhoneCountrySelectorModal.styles.ts entirely along with the useStyles hook usage, drops the unused custom styles, and shrinks the render callback's dependency list. No behavior change: the modal renders the same flag, country name, and dialing prefix per row.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TRAM-3579

Manual testing steps

Feature: Phone country selector modal layout

  Scenario: user selects a phone country code
    Given the user is in a Ramp flow that asks for a phone number

    When the user opens the phone country selector modal
    Then each row shows the country flag, name, and dialing prefix as before
    And searching filters the country list
    And tapping a country selects it and closes the modal

Screenshots/Recordings

Before

IMG_7087 (1)

After

qemu-system-x86_64_TiXGlwwVFV

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

Note

Low Risk
Presentational refactor in a single Ramp modal with no logic or data-flow changes.

Overview
Refactors Ramp phone country selector rows to use design-system ListItemSelect instead of a custom ListItemColumn + nested View layout.

Deletes PhoneCountrySelectorModal.styles.ts and drops useStyles, View, and component-library list column imports. Each row now sets flag via startAccessory, country name via title / titleProps, and dialing prefix via description / descriptionProps. Search, selection, and sheet behavior are unchanged; the render callback dependency list no longer includes style objects.

Reviewed by Cursor Bugbot for commit 2286344. Bugbot is set up for automated code reviews on this repo. Configure here.

@meltingice1337 meltingice1337 marked this pull request as ready for review July 15, 2026 14:01
@meltingice1337 meltingice1337 requested a review from a team as a code owner July 15, 2026 14:01
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jul 15, 2026
@metamask-ci metamask-ci Bot added the team-money-movement issues related to Money Movement features label Jul 15, 2026
@meltingice1337 meltingice1337 enabled auto-merge July 15, 2026 14:24
@meltingice1337 meltingice1337 removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeMoney
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR modifies two files in the Ramp/PhoneCountrySelectorModal directory:

  1. PhoneCountrySelectorModal.styles.ts - Deleted entirely (contained custom styles for region layout and emoji spacing).
  2. PhoneCountrySelectorModal.tsx - Refactored to use ListItemSelect built-in props (startAccessory, title, titleProps, description, descriptionProps) instead of manually composing ListItemColumn + View + custom styles.

This is a UI-only refactoring of the phone country selector modal within the Ramp (fiat on/off-ramp) flow. The same data is displayed and the same interactions are preserved — only the rendering approach changed to use component library built-ins. No functional behavior changes, no controller/state changes, no navigation changes.

The SmokeMoney tag covers MetaMask Card and fiat on/off-ramp flows, which includes the phone country selector modal used during ramp flows. This is the only relevant tag. No other flows (confirmations, swaps, accounts, etc.) are affected by this change.

Performance Test Selection:
The changes are a UI-only refactoring of the PhoneCountrySelectorModal component within the Ramp flow. The refactoring simplifies rendering by using built-in ListItemSelect props instead of custom Views/styles. This has no meaningful performance impact — it's a minor component simplification that doesn't affect any performance-sensitive flows like app launch, login, onboarding, swaps, or asset loading.

View GitHub Actions results

@github-actions github-actions Bot added the risk:low AI analysis: low risk label Jul 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

@meltingice1337 meltingice1337 added this pull request to the merge queue Jul 15, 2026
Merged via the queue into main with commit 20c7af5 Jul 15, 2026
153 of 156 checks passed
@meltingice1337 meltingice1337 deleted the fix/TRAM-3579 branch July 15, 2026 15:35
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 2026
@metamask-ci metamask-ci Bot added the release-8.4.0 Issue or pull request that will be included in release 8.4.0 label Jul 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-8.4.0 Issue or pull request that will be included in release 8.4.0 risk:low AI analysis: low risk size-S team-money-movement issues related to Money Movement features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants