Skip to content

Cherry-picking commits from main to release/7.82.0 for PR #31243#31661

Open
runway-github[bot] wants to merge 1 commit into
release/7.82.0from
runway-cherry-pick-7.82.0-1781288505
Open

Cherry-picking commits from main to release/7.82.0 for PR #31243#31661
runway-github[bot] wants to merge 1 commit into
release/7.82.0from
runway-cherry-pick-7.82.0-1781288505

Conversation

@runway-github

@runway-github runway-github Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Perps homepage sections used a mix of custom borders, one-off margins,
and the legacy component-library SectionHeader, which made spacing
inconsistent across Positions, Orders, Watchlist, Top Movers,
market-type sections, Recent Activity, and What's Happening.

This PR standardizes those sections on MMDS SectionHeader and
SectionDivider, removes bespoke section styles from PerpsHomeView,
and consolidates banner spacing above the first section.
WhatsHappeningSection follows the same section pattern when rendered
on Perps (and drops redundant bottom margin on Explore's Now tab, since
the section now owns its own spacing).

Changes:

  • Refactor PerpsHomeSection to use MMDS SectionHeader /
    SectionDivider instead of custom layout and legacy header components
  • Apply the same section pattern to PerpsWatchlistMarkets,
    PerpsTopMoversSection, PerpsRecentActivityList, and
    PerpsMarketTypeSection
  • Remove unused section/border styles from PerpsHomeView and related
    style files
  • Group service interruption, balance actions, and competition banners
    in a shared Box with consistent bottom padding
  • Update WhatsHappeningSection layout for Perps and adjust Explore Now
    tab wrapper spacing
  • Update PerpsHomeSection unit test for empty-title edge case

No functional or navigation behavior changes — this is a
layout/consistency refactor only.

Changelog

CHANGELOG entry: Standardize Perps homepage section layout

Related issues

Refs: https://consensyssoftware.atlassian.net/browse/DSYS-780

Manual testing steps

Feature: Perps homepage section layout

  Scenario: Perps home sections render with consistent spacing and dividers
    Given Perps is enabled and the user has an active Perps account with positions and/or orders
    When the user opens the Perps home screen
    Then Positions and Orders sections show MMDS section headers with dividers above them
    And section spacing is visually consistent between Positions, Orders, Watchlist, Top Movers, and market-type sections
    And tapping section header actions (e.g. close all / cancel all) still works as before

  Scenario: What's Happening section on Perps home
    Given the What's Happening feature flag is enabled
    When the user scrolls to the What's Happening section on Perps home
    Then the section shows a divider, header, and horizontal carousel
    And tapping the header or a card navigates to the detail view as before

  Scenario: Explore Now tab What's Happening spacing
    Given the What's Happening feature flag is enabled
    When the user opens Explore and views the Now tab
    Then the What's Happening section spacing looks correct relative to adjacent sections
    And no extra bottom margin causes awkward gaps

  Scenario: Empty and loading states unchanged
    Given the user has no open positions or orders
    When the user opens Perps home
    Then empty Positions/Orders sections are still hidden
    And loading skeletons still appear while data is fetching

Screenshots/Recordings

Before

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-06-08.at.16.48.27.mov

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-06-09.at.15.19.00.mov

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
  • Use these power-user
    SRPs

    to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production
    performance metrics
  • See trace() for usage and
    addToken
    for an example

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 layout and design-system component swaps only; navigation and
section visibility/loading behavior are intended to stay the same.

Overview
Perps home and related sections are **aligned on MMDS SectionDivider

  • SectionHeader** instead of legacy component-library headers and
    one-off top borders/margins.

PerpsHomeSection drops custom StyleSheet/Tailwind section
chrome and uses design-system headers; overflow actions use
ButtonIcon instead of TouchableOpacity + Icon.
PerpsMarketTypeSection, PerpsRecentActivityList,
PerpsWatchlistMarkets (v1/v2), PerpsTopMoversSection, and
WhatsHappeningSection follow the same pattern, with interactive
headers for “See all” where navigation existed before. Unused section
border styles are removed from PerpsHomeView and several
*.styles.ts files.

PerpsHomeView wraps the service interruption, balance actions,
and competition banners in a shared Box with bottom padding, and
renders What’s Happening without an extra wrapper view. Explore
NowTab drops redundant bottom margin on the What’s Happening
wrapper. One unit test asserts section presence via testID instead
of an empty title string.

Reviewed by Cursor Bugbot for commit
b9daf49. Bugbot is set up for automated
code reviews on this repo. Configure
here.

[2c5d5a0](https://github.com/MetaMask/metamask-mobile/commit/2c5d5a093992bf7eb7490b1ae9e4a935bec8332a)

…31243)

## **Description**

Perps homepage sections used a mix of custom borders, one-off margins,
and the legacy `component-library` `SectionHeader`, which made spacing
inconsistent across Positions, Orders, Watchlist, Top Movers,
market-type sections, Recent Activity, and What's Happening.

This PR standardizes those sections on MMDS `SectionHeader` and
`SectionDivider`, removes bespoke section styles from `PerpsHomeView`,
and consolidates banner spacing above the first section.
`WhatsHappeningSection` follows the same section pattern when rendered
on Perps (and drops redundant bottom margin on Explore's Now tab, since
the section now owns its own spacing).

**Changes:**
- Refactor `PerpsHomeSection` to use MMDS `SectionHeader` /
`SectionDivider` instead of custom layout and legacy header components
- Apply the same section pattern to `PerpsWatchlistMarkets`,
`PerpsTopMoversSection`, `PerpsRecentActivityList`, and
`PerpsMarketTypeSection`
- Remove unused section/border styles from `PerpsHomeView` and related
style files
- Group service interruption, balance actions, and competition banners
in a shared `Box` with consistent bottom padding
- Update `WhatsHappeningSection` layout for Perps and adjust Explore Now
tab wrapper spacing
- Update `PerpsHomeSection` unit test for empty-title edge case

No functional or navigation behavior changes — this is a
layout/consistency refactor only.

## **Changelog**

CHANGELOG entry: Standardize Perps homepage section layout

## **Related issues**

Refs: https://consensyssoftware.atlassian.net/browse/DSYS-780

## **Manual testing steps**

```gherkin
Feature: Perps homepage section layout

  Scenario: Perps home sections render with consistent spacing and dividers
    Given Perps is enabled and the user has an active Perps account with positions and/or orders
    When the user opens the Perps home screen
    Then Positions and Orders sections show MMDS section headers with dividers above them
    And section spacing is visually consistent between Positions, Orders, Watchlist, Top Movers, and market-type sections
    And tapping section header actions (e.g. close all / cancel all) still works as before

  Scenario: What's Happening section on Perps home
    Given the What's Happening feature flag is enabled
    When the user scrolls to the What's Happening section on Perps home
    Then the section shows a divider, header, and horizontal carousel
    And tapping the header or a card navigates to the detail view as before

  Scenario: Explore Now tab What's Happening spacing
    Given the What's Happening feature flag is enabled
    When the user opens Explore and views the Now tab
    Then the What's Happening section spacing looks correct relative to adjacent sections
    And no extra bottom margin causes awkward gaps

  Scenario: Empty and loading states unchanged
    Given the user has no open positions or orders
    When the user opens Perps home
    Then empty Positions/Orders sections are still hidden
    And loading skeletons still appear while data is fetching
```

## **Screenshots/Recordings**

### **Before**


https://github.com/user-attachments/assets/78f044a6-9df9-48f4-9aed-202a26ec017d

### **After**


https://github.com/user-attachments/assets/a4e6073e-5b52-4226-96ac-94cf4286a528

## **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.

#### Performance checks (if applicable)

- [x] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [x] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [x] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

## **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.




<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> UI layout and design-system component swaps only; navigation and
section visibility/loading behavior are intended to stay the same.
> 
> **Overview**
> Perps home and related sections are **aligned on MMDS `SectionDivider`
+ `SectionHeader`** instead of legacy `component-library` headers and
one-off top borders/margins.
> 
> **`PerpsHomeSection`** drops custom `StyleSheet`/Tailwind section
chrome and uses design-system headers; overflow actions use
**`ButtonIcon`** instead of `TouchableOpacity` + `Icon`.
**`PerpsMarketTypeSection`**, **`PerpsRecentActivityList`**,
**`PerpsWatchlistMarkets`** (v1/v2), **`PerpsTopMoversSection`**, and
**`WhatsHappeningSection`** follow the same pattern, with interactive
headers for “See all” where navigation existed before. Unused section
border styles are removed from **`PerpsHomeView`** and several
`*.styles.ts` files.
> 
> **`PerpsHomeView`** wraps the service interruption, balance actions,
and competition banners in a shared **`Box`** with bottom padding, and
renders What’s Happening without an extra wrapper view. Explore
**`NowTab`** drops redundant bottom margin on the What’s Happening
wrapper. One unit test asserts section presence via **`testID`** instead
of an empty title string.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
b9daf49. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@runway-github runway-github Bot requested review from a team as code owners June 12, 2026 18:21
@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.

@mm-token-exchange-service mm-token-exchange-service Bot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Jun 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - PR targets a release or stable branch (release/* or stable)

All E2E tests pre-selected.

View GitHub Actions results

@github-actions github-actions Bot added size-L risk:low AI analysis: low risk labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low AI analysis: low risk size-L team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant