Skip to content

refactor: Updated headers for the remaining of Rewards pages#27314

Merged
brianacnguyen merged 4 commits into
mainfrom
refactor/header-rewards-2
Mar 16, 2026
Merged

refactor: Updated headers for the remaining of Rewards pages#27314
brianacnguyen merged 4 commits into
mainfrom
refactor/header-rewards-2

Conversation

@brianacnguyen

@brianacnguyen brianacnguyen commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Description

Updates the Referral Rewards view, Rewards Settings view, and End of Season Claim bottom sheet to use the shared HeaderCompactStandard component and consistent safe-area handling, aligning with patterns used elsewhere in Rewards (e.g. Rewards Dashboard).

  1. Reason for the change: Referral view used getNavigationOptionsTitle and stack header; Settings and End of Season Claim used different header primitives (BottomSheetHeader in the claim sheet). This was inconsistent and made safe-area behavior harder to reason about.
  2. Improvement: Referral view now uses inline HeaderCompactStandard with SafeAreaView and headerShown: false for its stack screen. Settings view SafeAreaView uses edges={{ top: 'additive' }} and HeaderCompactStandard no longer uses includesTopInset. End of Season Claim bottom sheet uses HeaderCompactStandard instead of BottomSheetHeader, with the sheet title passed as the header title prop (custom header title render removed).

Changelog

CHANGELOG entry: null

Related issues

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

Manual testing steps

Feature: Rewards headers and safe area

  Scenario: Referral Rewards view shows inline header
    Given the app is open and user has access to Rewards

    When user navigates to Referral Rewards
    Then the screen shows HeaderCompactStandard with "Referral" title and back button
    And content is wrapped in SafeAreaView and scrolls correctly

  Scenario: Rewards Settings view header and safe area
    When user navigates to Rewards Settings
    Then the header and content respect safe areas (top additive)
    And the back button and title display correctly

  Scenario: End of Season Claim bottom sheet header
    When user opens the End of Season Claim bottom sheet (when applicable)
    Then the sheet shows HeaderCompactStandard with the reward title and close button
    And the sheet content and keyboard behavior are unchanged

Screenshots/Recordings

Before

After

Simulator Screenshot - iPhone 15 Pro Max - 2026-03-10 at 16 32 06 Simulator Screenshot - iPhone 15 Pro Max - 2026-03-10 at 16 35 28 Simulator Screenshot - iPhone 15 Pro Max - 2026-03-10 at 16 42 41

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 refactor affecting header rendering and safe-area insets on a few Rewards screens; main regression risk is incorrect insets or back/close behavior.

Overview
Unifies Rewards header behavior by moving the Referral screen off the stack header (headerShown: false) and rendering an inline HeaderCompactStandard inside a SafeAreaView.

Adjusts Rewards Settings safe-area handling to use edges={{ top: 'additive' }} (and removes includesTopInset from the header) for more consistent inset behavior.

Replaces the End-of-Season claim sheet’s BottomSheetHeader with HeaderCompactStandard, using the reward title directly (and removing the previous non-LINEA custom title renderer), and updates/streamlines associated tests accordingly.

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

@brianacnguyen brianacnguyen self-assigned this Mar 11, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner March 11, 2026 06:22
@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 Mar 11, 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.

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

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread app/components/UI/Rewards/Views/RewardsSettingsView.tsx
@brianacnguyen brianacnguyen enabled auto-merge March 11, 2026 19:13
@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: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
All changed files are confined to the Rewards UI feature (RewardsNavigator, RewardsReferralView, RewardsSettingsView, and EndOfSeasonClaimBottomSheet along with their unit tests). There are no changes to core wallet flows (accounts, confirmations, trade, network, identity, multi-chain, snaps, perps, ramps, card), no modifications to app/core/, Engine, Controllers, navigation roots, or shared components like Browser, Confirmations, or AccountSelector. The Rewards feature is not covered by any of the available E2E Smoke tags, and the modifications appear isolated to this feature’s UI and related unit tests. Therefore, no Detox E2E smoke tests are required for safe validation of this PR.

Performance Test Selection:
Changes are limited to a feature-specific UI section (Rewards) and do not affect app launch, onboarding, login, account lists, swaps, predictions, perps, asset loading, or other performance-critical flows. There are no modifications to rendering-heavy shared lists, controllers, or initialization logic. Performance tests are not required.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@brianacnguyen brianacnguyen added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 122be70 Mar 16, 2026
62 checks passed
@brianacnguyen brianacnguyen deleted the refactor/header-rewards-2 branch March 16, 2026 08:28
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 16, 2026
@metamaskbot metamaskbot added the release-7.71.0 Issue or pull request that will be included in release 7.71.0 label Mar 16, 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.71.0 Issue or pull request that will be included in release 7.71.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.

3 participants