Skip to content

chore: consolidate navigation style - swaps team#25879

Merged
asalsys merged 6 commits into
mainfrom
chore/consolidate-navigation-style-swaps
Feb 17, 2026
Merged

chore: consolidate navigation style - swaps team#25879
asalsys merged 6 commits into
mainfrom
chore/consolidate-navigation-style-swaps

Conversation

@asalsys

@asalsys asalsys commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Description

This PR consolidates navigation styles across the codebase by replacing inline navigationOptions style definitions with the shared getNavigationOptionsTitle utility function.

Reason for change:

  • Preparing the codebase for the upgrade to React Navigation v6
  • Navigation header styles were defined inconsistently across components using the legacy navigationOptions pattern
  • Centralizing navigation options will make the migration to React Navigation v6's new API smoother and reduce the scope of changes required during the upgrade

Solution:

  • Replaced inline style definitions with the centralized getNavigationOptionsTitle function from app/components/UI/Navbar
  • This ensures consistent navigation header styling across the app and simplifies the upcoming React Navigation v6 migration

Changelog

CHANGELOG entry: null

Related issues

Fixes: #23765 Part of React Navigation v6 upgrade preparation (split from original PR for easier code review by team)

Manual testing steps

Feature: Navigation header consistency

Scenario: User navigates to screens affected by this PR
Given the app is running

When user navigates to any screen modified in this PR
Then the navigation header should display correctly with proper title styling
And the back button should function as expected

Screenshots/Recordings

Before

N/A - No visual changes

After

N/A - No visual changes

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

Low Risk
Low risk UI navigation change limited to route targets/params for opening the in-app browser and the bridge block-explorer modal; main risk is misrouting if route signatures differ across navigators.

Overview
Bridge transaction details and the block-explorer modal now navigate directly to Routes.BROWSER.VIEW with newTabUrl/timestamp, instead of routing through Routes.BROWSER.HOME with nested screen/params.

For bridge transactions, opening the block explorer modal now navigates straight to Routes.BRIDGE.MODALS.TRANSACTION_DETAILS_BLOCK_EXPLORER rather than via the modal stack root. Associated tests were updated to assert the new navigation call shape.

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

@asalsys asalsys self-assigned this Feb 10, 2026
@asalsys asalsys added the team-mobile-platform Mobile Platform team label Feb 10, 2026
@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.

@asalsys asalsys force-pushed the chore/consolidate-navigation-style-swaps branch from af91719 to 77d89e3 Compare February 12, 2026 15:32
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The PR modifies navigation patterns in Bridge transaction details components (BlockExplorersModal.tsx, TransactionDetails.tsx). The changes simplify navigation from nested patterns (Routes.BROWSER.HOME with screen: Routes.BROWSER.VIEW) to direct navigation (Routes.BROWSER.VIEW). Similarly, bridge modal navigation is simplified from Routes.BRIDGE.MODALS.ROOT with nested screen to direct Routes.BRIDGE.MODALS.TRANSACTION_DETAILS_BLOCK_EXPLORER navigation.

These changes affect:

  1. Block explorer links in bridge transaction details (2 places in BlockExplorersModal.tsx)
  2. Block explorer links in swap transaction details (TransactionDetails.tsx)
  3. Bridge modal navigation for viewing transaction details

SmokeTrade is selected because it covers bridge and swap functionality, including transaction details viewing. SmokeConfirmations is selected as a dependent tag per the tag description guidance (when selecting SmokeTrade for swap/bridge flows, also select SmokeConfirmations).

The risk is medium because:

  • Navigation changes can have subtle effects on user flows
  • The changes are localized to specific components
  • Unit tests have been updated to match the new patterns
  • No business logic changes, only navigation structure simplification

Performance Test Selection:
The changes are purely navigation pattern simplifications (changing from nested navigation to direct navigation). There are no changes to UI rendering, data loading, state management, or any performance-critical paths. The navigation changes don't affect app startup, list rendering, or any other performance-sensitive areas.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@asalsys asalsys marked this pull request as ready for review February 16, 2026 17:06
@asalsys asalsys requested a review from a team as a code owner February 16, 2026 17:06
@asalsys asalsys enabled auto-merge February 16, 2026 17:06

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

navigation.navigate(Routes.BROWSER.HOME, {
screen: Routes.BROWSER.VIEW,
params: {
newTabUrl: swapSrcExplorerData.explorerTxUrl,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Direct browser navigation bypasses required nested navigator pattern

High Severity

Navigating directly to Routes.BROWSER.VIEW instead of through Routes.BROWSER.HOME with a nested screen/params object breaks navigation. BrowserView is a screen inside the BrowserFlow stack navigator, which is the component for the BrowserTabHome tab — and that tab uses UnmountOnBlur, so when the user is on a different tab (e.g., viewing transaction details), the BrowserFlow navigator is unmounted and BrowserView is not in the active navigation tree. Every other call site in the codebase correctly uses the nested pattern navigate(Routes.BROWSER.HOME, { screen: Routes.BROWSER.VIEW, params: {...} }).

Additional Locations (2)

Fix in Cursor Fix in Web

multiChainTx: props.route.params.multiChainTx,
},
});
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Direct modal navigation bypasses nested navigator mounting

High Severity

Navigating directly to Routes.BRIDGE.MODALS.TRANSACTION_DETAILS_BLOCK_EXPLORER instead of through Routes.BRIDGE.MODALS.ROOT with a nested screen/params object breaks the bridge block explorer modal. TransactionDetailsBlockExplorer is a screen inside BridgeModalStack, which is the component for Routes.BRIDGE.MODALS.ROOT in the main stack. If the modal stack hasn't been visited, its child screens aren't in the navigation tree. Every other bridge modal navigation in the codebase correctly uses navigate(Routes.BRIDGE.MODALS.ROOT, { screen: ..., params: {...} }).

Fix in Cursor Fix in Web

@asalsys asalsys added this pull request to the merge queue Feb 17, 2026
Merged via the queue into main with commit 463ce80 Feb 17, 2026
97 checks passed
@asalsys asalsys deleted the chore/consolidate-navigation-style-swaps branch February 17, 2026 19:37
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 17, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.67.0 Issue or pull request that will be included in release 7.67.0 size-S team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NAV UPGRADE - 4] Consolidate navigation API call style

3 participants