Skip to content

refactor: Updated Headers for Settings - Experimental pages#26411

Merged
brianacnguyen merged 19 commits into
mainfrom
header/settings-experimental
Feb 27, 2026
Merged

refactor: Updated Headers for Settings - Experimental pages#26411
brianacnguyen merged 19 commits into
mainfrom
header/settings-experimental

Conversation

@brianacnguyen
Copy link
Copy Markdown
Contributor

@brianacnguyen brianacnguyen commented Feb 23, 2026

Description

This PR updates the Experimental Settings and WalletConnect Sessions screens to use inline HeaderCompactStandard instead of stack navbar options.

Reason for change: Align Settings-related experimental screens with the app’s header pattern: simple back + title screens should use HeaderCompactStandard (or equivalent) rendered inline, with the stack header hidden, for consistent layout and safe area handling.

What changed:

  1. MainNavigator.js – For ExperimentalSettings and Routes.WALLET.WALLET_CONNECT_SESSIONS_VIEW (WalletConnectSessions), replaced options={...navigationOptions} with options={{ headerShown: false }} so both screens control their own headers.
  2. ExperimentalSettings/index.tsx – Removed useEffect and getNavigationOptionsTitle; removed useTheme usage for nav options. Wrapped the screen in SafeAreaView (edges: top) and added inline HeaderCompactStandard with title={strings('app_settings.experimental_title')}, onBack={handleBack}, and testIDs from ExperimentalView.testIds. Scroll content moved into a ScrollView with new styles.content (wrapper keeps background; content has padding).
  3. ExperimentalSettings.styles.ts – Split layout: wrapper keeps backgroundColor and flex: 1; added content with flex: 1, padding: 16, paddingBottom: 48 for the scrollable area below the header.
  4. ExperimentalView.testIds.ts – Added EXPERIMENTAL_SETTINGS_HEADER, EXPERIMENTAL_SETTINGS_BACK_BUTTON, WALLET_CONNECT_SESSIONS_HEADER, WALLET_CONNECT_SESSIONS_BACK_BUTTON for header and back button tests.
  5. ExperimentalSettings/index.test.tsx – Navigation mock now provides goBack instead of setOptions. Added tests: “renders inline HeaderCompactStandard with title and back button”, “calls navigation.goBack when back button is pressed”. Removed redundant comments in other tests. Snapshot updated.
  6. WalletConnectSessions/index.js – Removed getNavigationOptionsTitle, updateNavBar, and componentDidUpdate; switched to SafeAreaView from react-native-safe-area-context with edges={['top']}. Added inline HeaderCompactStandard with title “Wallet Connect dapps”, onBack, and testIDs from ExperimentalView.testIds.
  7. WalletConnectSessions/index.test.tsx – Added test “renders inline HeaderCompactStandard with title and back button” using the new header/back testIDs and title string. Snapshot updated.

Changelog

This PR is not end-user-facing (header presentation aligned with design; same screen content and behavior).

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/issues?jql=issueKey%20in%20(DSYS-357%2CDSYS-358%2CDSYS-359%2CDSYS-360)&selectedIssue=DSYS-360

Manual testing steps

Feature: Experimental Settings and WalletConnect Sessions header

  Scenario: user sees inline header on Experimental Settings
    Given the app is open and the user is in Settings
    When the user taps Experimental
    Then the Experimental Settings screen shows an inline header with title "Experimental" and a back button
    And the stack navigator header is not visible

  Scenario: user sees inline header on WalletConnect Sessions
    Given the user is on Experimental Settings
    When the user opens Wallet Connect dapps
    Then the WalletConnect Sessions screen shows an inline header with title "Wallet Connect dapps" and a back button
    And the stack navigator header is not visible

  Scenario: user can go back from Experimental screens
    Given the user is on Experimental Settings or WalletConnect Sessions
    When the user taps the back button in the header
    Then the app navigates back to the previous screen

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-02-22.at.18.36.47.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

Low Risk
UI-only navigation refactor limited to ExperimentalSettings and WalletConnectSessions; main risk is minor regressions in back navigation/safe-area/header visibility on those screens.

Overview
Moves ExperimentalSettings and WalletConnectSessions off stack-provided navbar options and onto an inline HeaderCompactStandard, with MainNavigator explicitly setting headerShown: false for both routes.

Wraps both screens in react-native-safe-area-context SafeAreaView (with bottom additive inset) and updates ExperimentalSettings layout to separate wrapper vs scroll content padding. Adds new header/back testIDs and extends unit tests + snapshots to verify header rendering and navigation.goBack behavior.

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

@brianacnguyen brianacnguyen self-assigned this Feb 23, 2026
@brianacnguyen brianacnguyen requested review from a team as code owners February 23, 2026 05:51
@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 no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Feb 23, 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.

Comment thread app/components/Views/Settings/ExperimentalSettings/index.test.tsx Outdated
Comment thread app/components/Views/Settings/ExperimentalSettings/index.tsx
Comment thread app/components/Views/WalletConnectSessions/index.js Outdated
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

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 1 potential issue.

Comment thread app/components/Views/WalletConnectSessions/index.js
vinnyhoward
vinnyhoward previously approved these changes Feb 25, 2026
jiexi
jiexi previously approved these changes Feb 25, 2026
@brianacnguyen brianacnguyen added this pull request to the merge queue Feb 25, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Feb 25, 2026
@brianacnguyen brianacnguyen dismissed stale reviews from jiexi and vinnyhoward via 3050bc1 February 25, 2026 22:26
@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: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR makes UI refactoring changes to two settings screens (ExperimentalSettings and WalletConnectSessions) to use inline HeaderCompactStandard components instead of navigation-based headers. The changes are:

  1. Scope: Limited to Settings flow screens that are not covered by existing E2E tests

  2. Nature of changes:

    • Replacing navigation header pattern with inline header component
    • Using SafeAreaView from react-native-safe-area-context
    • Updating MainNavigator to set headerShown: false for these screens
    • Adding test IDs for the new header components
  3. Impact assessment:

    • No E2E tests exist for WalletConnectSessions or ExperimentalSettings screens
    • The HeaderCompactStandard component is already widely used across the app (20+ importers)
    • Changes don't affect any transaction flows, confirmations, account management, or other critical paths
    • Unit tests have been updated with proper coverage for the new header behavior
  4. Risk factors:

    • Low risk - these are isolated UI changes in settings screens
    • The component being used (HeaderCompactStandard) is battle-tested
    • No changes to business logic, state management, or navigation routes

Since there are no E2E tests that cover these specific screens and the changes are purely UI refactoring using an established component pattern, no E2E test tags are needed.

Performance Test Selection:
These changes are UI refactoring for settings screens, replacing navigation headers with inline HeaderCompactStandard components. The changes don't affect: app startup/launch, account list rendering, login flow, swap flows, asset loading, or any performance-critical paths. The HeaderCompactStandard component is already used throughout the app and these changes simply adopt it in two more places. No performance impact expected.

View GitHub Actions results

@brianacnguyen brianacnguyen added this pull request to the merge queue Feb 27, 2026
Merged via the queue into main with commit 0f16851 Feb 27, 2026
59 checks passed
@brianacnguyen brianacnguyen deleted the header/settings-experimental branch February 27, 2026 16:47
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 27, 2026
@metamaskbot metamaskbot added the release-7.69.0 Issue or pull request that will be included in release 7.69.0 label Feb 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.69.0 Issue or pull request that will be included in release 7.69.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