Skip to content

chore: update header for send flow#24253

Merged
brianacnguyen merged 6 commits intomainfrom
header/send
Jan 6, 2026
Merged

chore: update header for send flow#24253
brianacnguyen merged 6 commits intomainfrom
header/send

Conversation

@brianacnguyen
Copy link
Copy Markdown
Contributor

@brianacnguyen brianacnguyen commented Jan 6, 2026

Description

Refactored the send flow navbar to use the new HeaderCenter component pattern via getHeaderCenterNavbarOptions. This replaces the manual header configuration (custom headerLeft, headerRight, headerTitle, and headerStyle implementations) with the standardized header component, significantly simplifying the code.

Why:
The send flow was using a custom inline header implementation with individually defined components for back button, close button, title, and styling. This duplicated logic that exists in the reusable HeaderCenter component.

Improvement:

  • Reduced useSendNavbar hook from ~100 lines to ~50 lines
  • Aligned send flow headers with the standardized HeaderCenter pattern used across the app
  • Improved maintainability by using a centralized header component

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MDP-654

Manual testing steps

Feature: Send flow navigation header

  Scenario: User navigates through send flow screens
    Given user is on the wallet home screen with available ETH balance

    When user taps on Send button
    Then user sees the Asset selection screen with "Send" title in header

    When user selects an asset and proceeds to Recipient screen
    Then user sees the Recipient screen with centered "Send" title, back button (left), and close button (right)

    When user selects a recipient and proceeds to Amount screen
    Then user sees the Amount screen with centered "Send" title, back button (left), and close button (right)

    When user taps the back button
    Then user navigates to the previous screen

    When user taps the close (X) button
    Then the send flow is closed and user returns to the home screen

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-01-05.at.16.14.01.mov

Pre-merge author checklist

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

Migrates the send flow to the standardized HeaderCenter header options and updates tests to match the new API.

  • Replaces manual headerLeft/headerRight/headerTitle/headerStyle with getHeaderCenterNavbarOptions for Amount, Asset, and Recipient, wiring onBack/onClose, includesTopInset, and test IDs
  • Removes theme/design-system header composition and related code from useSendNavbar
  • Updates tests to render the header function, assert back/close buttons and title, and adjusts mocks (react-navigation, safe area, tailwind, design-system)

Written by Cursor Bugbot for commit 53d0f5c. This will update automatically on new commits. Configure here.

@brianacnguyen brianacnguyen self-assigned this Jan 6, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner January 6, 2026 00:18
@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 Jan 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 6, 2026

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 Jan 6, 2026
onBack: handleCancelPress,
title: strings('send.title'),
includesTopInset: true,
}),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Asset screen loses close button, shows back arrow instead

The Asset screen configuration uses onBack: handleCancelPress instead of onClose: handleCancelPress. This changes the UI from showing a close button (X) on the right side to showing a back arrow (←) on the left side. The original implementation had headerRight with a close button for Asset, not a back button. For consistency with the old behavior, the Asset configuration likely needs onClose instead of onBack to render the X button on the right side rather than a back arrow on the left.

Fix in Cursor Fix in Web

@github-actions github-actions bot added size-M and removed size-S labels Jan 6, 2026
@nmg8679-web
Copy link
Copy Markdown

nmg8679-web commented Jan 6, 2026 via email

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 6, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeConfirmationsRedesigned
  • Risk Level: medium
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

The changes are a UI refactoring of the Send flow navigation header in the confirmations feature. The useSendNavbar hook is being updated to use a centralized getHeaderCenterNavbarOptions utility instead of manually creating header components.

Key observations:

  1. This is a pure UI refactoring - the navigation behavior (back button, close button, title) remains functionally the same
  2. The changes affect the Send flow screens (Amount, Asset, Recipient) which are part of the confirmations flow
  3. The test file has been updated to match the new implementation pattern
  4. No business logic changes - just how the header components are rendered

The SmokeConfirmationsRedesigned tag is the most appropriate because:

  • The changes are in app/components/Views/confirmations/ directory
  • The Send flow is part of the confirmation process
  • The tag description mentions "New confirmation UI as well as all confirmation flows"

Risk is medium because while this is a refactoring, it affects user-visible navigation elements in a critical flow (sending assets). The comprehensive test updates provide good coverage for the changes.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 6, 2026

@brianacnguyen brianacnguyen added this pull request to the merge queue Jan 6, 2026
Merged via the queue into main with commit 51d193f Jan 6, 2026
91 checks passed
@brianacnguyen brianacnguyen deleted the header/send branch January 6, 2026 16:37
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2026
@metamaskbot metamaskbot added the release-7.62.0 Issue or pull request that will be included in release 7.62.0 label Jan 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.62.0 Issue or pull request that will be included in release 7.62.0 size-M team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants