chore: consolidate navigation style - ux team#25877
Conversation
|
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. |
94886bc to
27c8ae9
Compare
Update test to match implementation that navigates directly to 'PaymentRequest' instead of 'PaymentRequestView' with nested screen.
PatrykLucka
left a comment
There was a problem hiding this comment.
I just tested this PR and the transaction details from activity view are not opening. It’s worth looking into BugBot’s comments.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The RpcSelectionModal is part of the NetworkSelector component and is used when users select different RPC endpoints for networks. This functionality falls under network management, which is covered by SmokeNetworkAbstractions. The risk is low because:
Performance Test Selection: |
|
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **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** <!-- No visual changes expected - this is a code refactoring PR --> ### **Before** N/A - No visual changes ### **After** N/A - No visual changes ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.](#25877) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches navigation behavior in confirmation and account-switch flows, so small route/stack differences could change where users land or how modals close. Changes are localized and covered by updated tests. > > **Overview** > Consolidates confirmations-related navigation by replacing the nested `navigation.navigate(Routes.WALLET.HOME, { ...Routes.WALLET_VIEW... })` pattern with a direct `navigation.navigate(Routes.WALLET_VIEW)`. > > This updates the switch-account-type modal’s close behavior (`AccountNetworkRow`), the post-confirm flow for `TransactionType.musdConversion` (`useTransactionConfirm`), and the “reject then go home” path (`useConfirmActions`), with associated test expectation updates. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0d8b7de. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
|
This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions. |
|
This PR was closed because there has been no follow up activity in 7 days. Thank you for your contributions. |
Pull request was closed



Description
This PR consolidates navigation styles across the codebase by replacing inline
navigationOptionsstyle definitions with the sharedgetNavigationOptionsTitleutility function.Reason for change:
navigationOptionspatternSolution:
getNavigationOptionsTitlefunction fromapp/components/UI/NavbarChangelog
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
Screenshots/Recordings
Before
N/A - No visual changes
After
N/A - No visual changes
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Small, localized navigation behavior change plus a test update; low risk but could affect post-RPC-selection routing if
Routes.WALLET_VIEWisn’t equivalent everywhere.Overview
Simplifies the RPC selection flow redirect by replacing nested
navigate(Routes.WALLET.HOME, { ... })calls with a directnavigate(Routes.WALLET_VIEW)after updating the default RPC and active network.Updates
ReceiveRequestnavigation testing to pullreceiveAssetfromstate.modals(instead of passing it as a prop) and to assert the exact navigation params ({ params: { receiveAsset } }) passed toPaymentRequestView.Written by Cursor Bugbot for commit 688222d. This will update automatically on new commits. Configure here.