Skip to content

chore: use DS svg icons in token details chart#29293

Merged
sahar-fehri merged 1 commit into
mainfrom
chore/use-ds-icons
Apr 23, 2026
Merged

chore: use DS svg icons in token details chart#29293
sahar-fehri merged 1 commit into
mainfrom
chore/use-ds-icons

Conversation

@sahar-fehri
Copy link
Copy Markdown
Contributor

@sahar-fehri sahar-fehri commented Apr 23, 2026

Description

PR to use DS icons instead of custom SVG icons for chart.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

Screen.Recording.2026-04-23.at.22.15.16.mov

After

Screen.Recording.2026-04-23.at.22.14.29.mov

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
Low risk UI-only change that swaps the chart type toggle’s custom SVG icons for design-system Icon components; behavior and data flow are unchanged.

Overview
Updates the token details chart TimeRangeSelector to remove custom react-native-svg candlestick/line icons and instead render the design-system Icon (IconName.TrendUp / IconName.Candlestick) for the chart type toggle.

This simplifies icon rendering by relying on DS-provided sizing/color tokens (IconSize, IconColor) rather than inline SVG paths.

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

@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
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The change in TimeRangeSelector.tsx is a pure UI refactor: it removes two custom inline SVG icon components (CandlestickIcon and LineChartIcon built with react-native-svg) and replaces them with standard Icon components from @metamask/design-system-react-native. The IconSize import is also consolidated to come from the design system package instead of the local component library. There are no logic, state, API, or behavioral changes. The component is used in the AdvancedChart within the AssetOverview price view (token detail screen). No E2E tests directly cover the chart type toggle button functionality, and this change does not affect any critical user flows (accounts, confirmations, swaps, networks, etc.). The risk is low and no E2E test tags are warranted.

Performance Test Selection:
This is a pure icon rendering refactor — replacing custom SVG components with design system Icon components. If anything, this slightly simplifies rendering (fewer custom SVG nodes). No performance impact is expected, and no performance test tags are needed.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

LGTM!

@sahar-fehri sahar-fehri added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit d495d8f Apr 23, 2026
87 checks passed
@sahar-fehri sahar-fehri deleted the chore/use-ds-icons branch April 23, 2026 21:53
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.76.0 Issue or pull request that will be included in release 7.76.0 label Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.76.0 Issue or pull request that will be included in release 7.76.0 size-S team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants