Skip to content

fix: fix trending label display cp-7.77.0#30020

Merged
sahar-fehri merged 2 commits into
mainfrom
fix/fix-text-label-display-trending
May 12, 2026
Merged

fix: fix trending label display cp-7.77.0#30020
sahar-fehri merged 2 commits into
mainfrom
fix/fix-text-label-display-trending

Conversation

@sahar-fehri

@sahar-fehri sahar-fehri commented May 12, 2026

Copy link
Copy Markdown
Contributor

Description

On small screen devices (e.g., iPhone SE), the FilterButton label text (e.g., "Price change") wraps to two lines. The root cause: callers like the price-change button and Bridge filter buttons don't pass numberOfLines or ellipsizeMode, so these default to undefined — allowing unlimited text wrapping when flex-shrink compresses the button.

This adds sensible defaults (numberOfLines ?? 1, ellipsizeMode ?? 'tail') inside FilterButton so all labels stay on a single line and truncate with ellipsis when constrained.

Changelog

CHANGELOG entry: Fixed trending filter button labels wrapping to two lines on small screens by defaulting to single-line truncation.

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]

Screenshots/Recordings

Before

image

After

Pre-merge author checklist

Screenshot 2026-05-12 at 10 23 31

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

For performance guidelines and tooling, see the Performance Guide.

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 change that adjusts text rendering defaults; main risk is unintended truncation in places relying on multi-line labels.

Overview
Prevents FilterButton labels in Trending’s FilterBar from wrapping by defaulting numberOfLines to 1 and ellipsizeMode to 'tail' when callers don’t provide them.

This standardizes truncation behavior across filter buttons on constrained layouts (e.g., small screens) without requiring each caller to pass these props.

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

@sahar-fehri sahar-fehri marked this pull request as ready for review May 12, 2026 08:24
@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.

@sahar-fehri sahar-fehri changed the title fix: fix trending label display fix: fix trending label display cp-7.77.0 May 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The change is a minimal bug fix in FilterBar.tsx within the Trending component. It adds default fallback values (?? 1 for numberOfLines and ?? 'tail' for ellipsizeMode) to prevent undefined from being passed to the React Native Text component's props. This is a defensive UI fix.

The FilterBar component is used in:

  1. Trending (TokenListPageLayout, etc.) → SmokeWalletPlatform (Trending tab tests)
  2. Ramp/Deposit (NetworksFilterBar, TokenSelectModal) → SmokeMoney
  3. Bridge (BridgeTrendingTokensSection) → SmokeSwap

However, the actual code change only affects the default prop behavior when numberOfLines or ellipsizeMode are not provided. Since these are optional props with sensible defaults now being applied, the risk is very low. The primary area to validate is the Trending tab (SmokeWalletPlatform), as that's where the FilterBar is most prominently used. The Ramp and Bridge usages likely pass explicit values for these props, so they are unlikely to be affected.

SmokeWalletPlatform is sufficient to validate the Trending FilterBar behavior. No performance tests are needed for this minor UI prop default fix.

Performance Test Selection:
This is a minor UI prop default fix (adding ?? fallback values) with no performance implications. No performance tests are needed.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@sahar-fehri sahar-fehri enabled auto-merge May 12, 2026 08:51
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ E2E Fixture Validation — Structural changes detected

Category Count
New keys 42
Missing keys 0
Type mismatches 0
Value mismatches 9 (informational)

The committed fixture schema is out of date. To update, comment:

@metamaskbot update-mobile-fixture

View full details | Download diff report

@sahar-fehri sahar-fehri added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit ca9df54 May 12, 2026
107 of 109 checks passed
@sahar-fehri sahar-fehri deleted the fix/fix-text-label-display-trending branch May 12, 2026 09:39
@github-actions github-actions Bot locked and limited conversation to collaborators May 12, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.78.0 Issue or pull request that will be included in release 7.78.0 label May 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.78.0 Issue or pull request that will be included in release 7.78.0 size-XS team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants