Skip to content

refactor(earn): use MMDS HeaderStandard#29702

Merged
brianacnguyen merged 3 commits into
mainfrom
refactor/headerstandard-titles-earn
May 6, 2026
Merged

refactor(earn): use MMDS HeaderStandard#29702
brianacnguyen merged 3 commits into
mainfrom
refactor/headerstandard-titles-earn

Conversation

@brianacnguyen

@brianacnguyen brianacnguyen commented May 5, 2026

Copy link
Copy Markdown
Contributor

Description

This change replaces the temporary HeaderCompactStandard component with HeaderStandard from @metamask/design-system-react-native on Earn-related surfaces.

Reason: Align Earn UI with the MetaMask design system and reduce reliance on component-library/components-temp for standard headers.

What changed: HeaderStandard is used for the Lending “How it works” bottom sheet, the Earn input screen header (back button and end actions), and the Earn token list bottom sheet. Behavior is intended to match the previous header (title, back/close, analytics-related tests unchanged aside from naming). Unit test comments and a describe block name were updated to reference HeaderStandard.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-699

Manual testing steps

Feature: Earn headers use design system HeaderStandard

  Scenario: Earn input screen header matches prior behavior
    Given the user is on the Earn flow and opens the amount/input screen (e.g. stake or supply)
    When the user views the screen header and uses the back control
    Then the header shows the expected title and navigation behaves as before

  Scenario: Lending “How it works” modal
    Given the user opens the Lending learn-more / “How it works” bottom sheet from Earn
    When the user views the header and taps close
    Then the sheet dismisses as before

  Scenario: Earn token selection bottom sheet
    Given the user opens the token list bottom sheet (e.g. select token to supply or withdraw)
    When the user views the header title and uses the close control
    Then the sheet closes as before and titles match the prior copy for the flow

Screenshots/Recordings

Before

After

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 refactor that swaps a temporary header component for the design-system header on a few Earn screens; main regression risk is minor UI/interaction differences in back/close and end-icon rendering.

Overview
Updates Earn surfaces to use the design-system HeaderStandard instead of the temporary HeaderCompactStandard, including the Lending “How it works” bottom sheet, the EarnInputView screen header (back + optional info icon), and the Earn token list bottom sheet (close button + title).

Adjusts imports accordingly (including IconName usage from the design system) and updates unit test descriptions/comments to reference HeaderStandard while keeping behavioral assertions the same.

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

Co-authored-by: Cursor <cursoragent@cursor.com>
@brianacnguyen brianacnguyen self-assigned this May 5, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner May 5, 2026 05:26
@brianacnguyen brianacnguyen added No QA Needed Apply this label when your PR does not need any QA effort. team-design-system All issues relating to design system in Mobile no changelog required No changelog entry is required for this change labels May 5, 2026
@github-actions

github-actions Bot commented May 5, 2026

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 size-S label May 5, 2026
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
All 5 changed files are within the app/components/UI/Earn/ directory and represent a single focused refactoring: replacing the internal temporary HeaderCompactStandard component (from component-library/components-temp/) with the official HeaderStandard component from @metamask/design-system-react-native. This affects three Earn UI screens: LendingLearnMoreModal, EarnInputView (stake/lending input), and EarnTokenList (token selection bottom sheet). The test file changes are purely cosmetic (updating describe block names and comments to reflect the new component name). The functional behavior — title display, back button, close button handlers — remains unchanged. SmokeStake is selected as the primary tag since EarnInputView and EarnTokenList are core to staking and lending deposit/withdrawal flows. SmokeConfirmations is included per the tag dependency rule (staking/lending flows involve transaction confirmations).

Performance Test Selection:
The changes are a pure UI component swap (HeaderCompactStandard → HeaderStandard) with no changes to data loading, state management, list rendering, or app initialization. No performance impact is expected from this header component migration.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown

@brianacnguyen brianacnguyen added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 428bdda May 6, 2026
96 checks passed
@brianacnguyen brianacnguyen deleted the refactor/headerstandard-titles-earn branch May 6, 2026 22:56
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no changelog required No changelog entry is required for this change No QA Needed Apply this label when your PR does not need any QA effort. release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-S team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants