Skip to content

fix(perps): watchlist and explore header and list padding fix cp-7.64.0 #25407

Merged
geositta merged 6 commits intomainfrom
perps/fix-header-styles
Jan 30, 2026
Merged

fix(perps): watchlist and explore header and list padding fix cp-7.64.0 #25407
geositta merged 6 commits intomainfrom
perps/fix-header-styles

Conversation

@geositta
Copy link
Copy Markdown
Contributor

@geositta geositta commented Jan 29, 2026

Description

  • Fix header font weight to match Figma design specs (500 Medium instead of 700
    Bold)

    • Implement dynamic header padding based on context (balance visibility, watchlist
      presence)
    • Remove redundant horizontal padding from Watchlist component (inherited from
      parent)
    • Increase explore market row vertical padding from 6px to 16px
    • Add horizontal margin to "See All Perps" button

    Changes

    Font Weight:

    • Changed Watchlist and Explore headers from TextVariant.HeadingMD to
      TextVariant.BodyLGMedium

    Dynamic Header Padding:

    • Watchlist header: 16px/4px (no balance) or 24px/4px (with balance)
    • Explore header: 16px/4px (no balance), 24px/4px (with balance), or 20px/8px (below
      watchlist)

    Padding Cleanup:

    • Removed duplicate paddingHorizontal: 16 from watchlist header/list (inherits from
      parent)
    • Updated explore market row paddingVertical from 6px to 16px
    • Added marginHorizontal: 16 to "See All Perps" button

Changelog

CHANGELOG entry: Fix watchlist and explore header and list padding

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
  • Verify Watchlist/Explore headers display with Medium font weight (500)
  • Verify header padding adjusts correctly when balance is empty vs non-empty
  • Verify Explore header spacing changes when Watchlist is visible vs hidden
  • Verify market row spacing matches Figma spec

Screenshots/Recordings

Before

After

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-only changes adjusting layout/typography and swapping PerpsTabView to inline-render watchlist rows; no business logic or data flow changes beyond presentation.

Overview
Adjusts the Perps wallet-home tab layout to match design specs by standardizing header typography (TextVariant.BodyLGMedium) and tuning spacing (dynamic watchlist/explore header padding based on balance visibility and watchlist presence, larger row vertical padding, and horizontal margins for the “See all perps” button).

PerpsTabView no longer uses PerpsWatchlistMarkets in the empty state; it now renders watchlist rows inline via PerpsMarketRowItem with a local skeleton state. Shared section components (PerpsHomeSection, PerpsMarketTypeSection, PerpsWatchlistMarkets) also get minor header spacing tweaks, and tests are updated to mock the new dependencies.

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

@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.

@metamaskbot metamaskbot added the team-perps Perps team label Jan 29, 2026
@aganglada aganglada changed the title fix(perps): watchlist and explore header and list padding fix cp-7.63.0 fix(perps): watchlist and explore header and list padding fix cp-7.64.0 Jan 29, 2026
aganglada
aganglada previously approved these changes Jan 29, 2026
@geositta geositta marked this pull request as ready for review January 29, 2026 19:47
@geositta geositta requested a review from a team as a code owner January 29, 2026 19:47
@geositta geositta enabled auto-merge January 29, 2026 19:52
@geositta geositta disabled auto-merge January 29, 2026 20:04
@aganglada aganglada added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Jan 29, 2026
</View>
{watchlistMarkets.map(renderExploreMarketRow)}
</View>
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Watchlist header tap-to-navigate functionality removed

Medium Severity

The new inline renderWatchlistSection function renders the "Watchlist" header as a plain View, but the previous PerpsWatchlistMarkets component used a TouchableOpacity with an onPress handler that navigated to Routes.PERPS.MARKET_LIST. Users could tap the watchlist header to view all markets. This navigation functionality is now missing entirely in the PerpsTabView, as the header is no longer interactive.

Additional Locations (1)

Fix in Cursor Fix in Web

</View>
),
[styles.header, styles.titleRow, handleViewAll, headerStyle],
[styles.header, headerStyle],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shared component lost clickable header navigation functionality

Medium Severity

The PerpsWatchlistMarkets component's header was changed from a pressable TouchableOpacity (with arrow icon and navigation to market list) to a non-interactive View. While PerpsTabView now uses inline rendering and doesn't rely on this component, PerpsHomeView still uses PerpsWatchlistMarkets directly. This removes the ability for users to tap the "Watchlist" header to navigate to the full market list in PerpsHomeView. The PR description mentions font weight and padding changes but not this functional regression.

Fix in Cursor Fix in Web

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePerps
  • Selected Performance tags: @PerformancePreps
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are purely UI/styling modifications to the Perps (perpetuals trading) components:

  1. PerpsTabView.tsx: Refactored to use a new PerpsMarketRowItem component instead of inline rendering, replaced PerpsWatchlistMarkets component with inline rendering, added context-aware header styles, and changed text variants from BodyMDMedium to BodyLGMedium.

  2. PerpsHomeSection.tsx: Minor margin adjustment (marginBottom: 8 → 12).

  3. PerpsMarketTypeSection.tsx: Changed text variant from HeadingMD to BodyLGMedium and margin adjustment.

  4. PerpsWatchlistMarkets.tsx: Simplified header component by removing TouchableOpacity navigation and arrow icon, changed text variant.

  5. Style files: Various padding/margin adjustments for visual consistency.

  6. Test file: Added mock for usePerpsLivePrices and test selectors.

All changes are contained within the Perps UI components with no functional/business logic changes. The SmokePerps tag is the appropriate choice as it covers the Perps trading functionality including the Add Funds flow, balance verification, and Perps interface. No other features are affected by these changes.

Performance Test Selection:
The changes involve refactoring of Perps UI components including market list rendering (PerpsMarketRowItem), watchlist section rendering, and explore section rendering. While these are primarily styling changes, the component refactoring (replacing inline rendering with a new component, changing from shared PerpsWatchlistMarkets to inline rendering) could potentially impact rendering performance. The @PerformancePreps tag covers perps market loading and position management which aligns with the changed components.

View GitHub Actions results

Copy link
Copy Markdown
Member

@gambinish gambinish left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for working through this

Copy link
Copy Markdown

@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 2 potential issues.

justifyContent: 'space-between',
alignItems: 'center',
paddingVertical: 6,
paddingVertical: 16,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unused explore market row styles after refactoring

Low Severity

The styles exploreMarketRow, exploreMarketLeft, exploreMarketIcon, exploreMarketInfo, exploreMarketHeader, exploreMarketSecondRow, exploreMarketRight, exploreMarketPrice, and exploreMarketChange are now dead code. These were used by the removed renderExploreMarketRow function, which was replaced with PerpsMarketRowItem. The styles remain defined but are never referenced anywhere in the codebase.

Fix in Cursor Fix in Web

alignItems: 'center',
paddingHorizontal: 16,
marginBottom: 8,
marginBottom: 12,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unused titleRow style in PerpsWatchlistMarkets

Low Severity

The titleRow style is now dead code after the header was simplified from a pressable TouchableOpacity with nested content and chevron icon to a simple View with just text. The style definition remains but styles.titleRow is never referenced in PerpsWatchlistMarkets.tsx.

Fix in Cursor Fix in Web

@geositta geositta enabled auto-merge January 29, 2026 23:26
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
63.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@geositta geositta added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 74f8159 Jan 30, 2026
85 of 86 checks passed
@geositta geositta deleted the perps/fix-header-styles branch January 30, 2026 00:07
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2026
@metamaskbot metamaskbot added the release-7.65.0 Issue or pull request that will be included in release 7.65.0 label Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.65.0 Issue or pull request that will be included in release 7.65.0 size-M skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants