Skip to content

fix(perps): truncate long market sort labels - #36852

Merged
andrewchra merged 4 commits into
mainfrom
fix/perps-market-sort-title-truncation
Sep 29, 2026
Merged

andrewchra merged 4 commits into
mainfrom
fix/perps-market-sort-title-truncation

Conversation

@andrewchra

@andrewchra andrewchra commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

On the Perps markets sort sheet, selecting a sort option shows the direction ("high to low") beside the option title. In long locales such as Greek, "Χρέωση χρηματοδότησης" was squeezed into a few pixels and wrapped one letter per line.

The title now stays on one line and ellipsizes when it does not fit next to the direction text.

Changelog

CHANGELOG entry: Fixed Perps market sort labels wrapping in long translations

Related issues

Fixes: none — no matching GitHub issue for this layout bug

Manual testing steps

Feature: Perps market sort labels

  Scenario: long locale titles ellipsize instead of wrapping
    Given the app language is Greek
    And the user is on the Perps markets list

    When the user opens the sort sheet
    And the user selects "Χρέωση χρηματοδότησης"
    Then the option title stays on one line and ends with an ellipsis
    And the high-to-low direction text and arrow stay visible on the same row

  Scenario: short titles are unchanged
    Given the app language is English
    And the user is on the Perps markets list

    When the user opens the sort sheet
    And the user selects "Funding rate"
    Then the full title is visible on one line next to the direction text

Screenshots/Recordings

Before

Greek funding-rate label wraps one letter per line beside the direction text.
image

After

Greek funding-rate label stays on one line and ellipsizes (Χρέω...).
image

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

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

Note

Low Risk
Localized UI text layout in the Perps sort sheet plus a test fixture field; no auth, payments, or trading logic changes.

Overview
Fixes a Perps market sort bottom sheet layout issue where long translated option titles (e.g. Greek funding rate) wrapped one character per line beside the selected sort direction.

Each sort option’s ListItemSelect now passes titleProps with numberOfLines: 1 and ellipsizeMode: 'tail', so the label stays on one row and truncates with an ellipsis while the high/low direction text and arrow remain visible.

The default test fixture also adds KycController.providerFlowStatus: "not_started" so persisted state matches the current controller shape.

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

Long translations were wrapping one letter per line beside the sort direction instead of ellipsizing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@andrewchra andrewchra added the team-perps Perps team label Sep 25, 2026
@andrewchra andrewchra self-assigned this Sep 25, 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.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Smart E2E Test Selection

Selected E2E tags: ALL

AI Confidence: 100

E2E reasoning

Expand to read

Two changes in this PR:

  1. PerpsMarketSortFieldBottomSheet.tsx: Adds titleProps={{ numberOfLines: 1, ellipsizeMode: 'tail' }} to prevent long translations from wrapping. This is a minor UI fix in the Perps market sort bottom sheet. On its own, this would only require SmokePerps + SmokeWalletPlatform (Perps is a section inside Trending). However, the second change overrides this narrow scope.

  2. tests/framework/fixtures/json/default-fixture.json: Adds "providerFlowStatus": "not_started" to the shared default fixture. This file is imported by FixtureBuilder.ts which is the foundation for virtually all E2E tests. Adding a new field to the default fixture state could affect any test that relies on fixture state shape, fixture validation, or state initialization. This is a shared test infrastructure change with wide blast radius.

The hard rule seed correctly identified ALL tags due to the test framework infrastructure change. The default-fixture.json is a critical shared resource — any change to it warrants running all E2E tests to ensure no regressions across the full test suite. The providerFlowStatus field appears to be a new required field for a provider/ramps controller state that was previously missing from the fixture, which could fix or break tests depending on how they consume this state.

Performance reasoning

Expand to read

No performance-sensitive code paths were changed. The PerpsMarketSortFieldBottomSheet change is a minor text truncation prop addition with no render performance impact. The default-fixture.json change adds a single string field to test fixture state with no app code changes. Neither change affects measured performance scenarios like account list rendering, onboarding flows, login, swaps, app launch, asset loading, predictions, perps trading performance, money account loading, or rewards tab.

View run

@andrewchra
andrewchra marked this pull request as ready for review September 25, 2026 04:58
@andrewchra
andrewchra requested a review from a team as a code owner September 25, 2026 04:58
@github-actions github-actions Bot added the risk:low AI analysis: low risk label Sep 25, 2026
The title line clamp does not depend on which option is selected.
@github-actions github-actions Bot added size-XS and removed size-S labels Sep 28, 2026
@andrewchra
andrewchra requested a review from a team as a code owner September 28, 2026 12:50
@sonarqubecloud

Copy link
Copy Markdown

@andrewchra
andrewchra added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit 292c287 Sep 29, 2026
234 of 237 checks passed
@andrewchra
andrewchra deleted the fix/perps-market-sort-title-truncation branch September 29, 2026 11:25
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 29, 2026
@metamask-ci metamask-ci Bot added the release-8.15.0 Issue or pull request that will be included in release 8.15.0 label Sep 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-8.15.0 Issue or pull request that will be included in release 8.15.0 risk:low AI analysis: low risk size-XS team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants