Skip to content

Conversation

@nickewansmith
Copy link
Contributor

@nickewansmith nickewansmith commented Nov 11, 2025

Description

feat: Remove stocks/commodities dropdown and fix FlashList gaps

Changes:

  • Remove conditional stocks/commodities dropdown in market list view

    • Set showStocksCommoditiesDropdown to false (always hidden)
    • Add tests to verify dropdown is not shown regardless of market type filter
  • Fix FlashList layout gaps in market lists

    • Add drawDistance={200} and removeClippedSubviews props to PerpsMarketList
    • Create marketListConfig.ts for FlashList configuration constants
    • Prevents blank space gaps when searching or scrolling
  • Fix pre-existing test failure

    • Refactor "handles search with whitespace" test to use proper mocking
    • Rename to "filters markets with whitespace-only query" for clarity

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2041
Fixes: #22440

Manual testing steps

feat: Remove stocks/commodities dropdown and fix FlashList gaps

Feature: Market List View Filtering
  Scenario: Hide secondary dropdown in stocks tab
    Given the market list view is displayed
    When the user is on any market type tab
    Then the stocks/commodities dropdown should not be visible
    And the filter bar should only show the sort dropdown

Feature: FlashList Rendering
  Scenario: Prevent layout gaps in market list
    Given the market list uses FlashList for rendering
    When markets are displayed in search or tab views
    Then there should be no blank space gaps
    And items should render 200px ahead of viewport
    And clipped subviews should be removed for optimal layout

Screenshots/Recordings

Before

After

Simulator Screenshot - iPhone 17 Pro - 2025-11-10 at 18 23 47

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

Hides the stocks/commodities dropdown in the market list and configures FlashList (drawDistance, removeClippedSubviews) via new constants to prevent layout gaps, with tests updated accordingly.

  • UI:
    • Force-hide stocks/commodities dropdown by setting showStocksCommoditiesDropdown={false} in PerpsMarketListView.
  • Performance/Rendering:
    • Add drawDistance={200} and removeClippedSubviews to PerpsMarketList’s FlashList.
    • Centralize list config in constants/marketListConfig.ts (PERPS_MARKET_LIST_CONSTANTS).
  • Tests:
    • Add assertions that stocks/commodities dropdown is not rendered (regardless of market filter).
    • Refactor whitespace-only search test using hook-based mocking and rename for clarity.

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

feat: Remove stocks/commodities dropdown and fix FlashList gaps

Changes:
- Remove conditional stocks/commodities dropdown in market list view
  - Set showStocksCommoditiesDropdown to false (always hidden)
  - Add tests to verify dropdown is not shown regardless of market type filter

- Fix FlashList layout gaps in market lists
  - Add drawDistance={200} and removeClippedSubviews props to PerpsMarketList
  - Create marketListConfig.ts for FlashList configuration constants
  - Prevents blank space gaps when searching or scrolling

- Fix pre-existing test failure
  - Refactor "handles search with whitespace" test to use proper mocking
  - Rename to "filters markets with whitespace-only query" for clarity
@github-actions
Copy link
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.

@nickewansmith nickewansmith marked this pull request as ready for review November 11, 2025 00:27
@nickewansmith nickewansmith requested a review from a team as a code owner November 11, 2025 00:27
@nickewansmith nickewansmith added team-perps Perps team and removed team-earn labels Nov 11, 2025
@sonarqubecloud
Copy link

@nickewansmith nickewansmith added this pull request to the merge queue Nov 11, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 11, 2025
@abretonc7s abretonc7s added this pull request to the merge queue Nov 11, 2025
Merged via the queue into main with commit 440bb05 Nov 11, 2025
121 of 128 checks passed
@abretonc7s abretonc7s deleted the TAT-2041-remove-secondary-dropdown-in-stocks-tab branch November 11, 2025 05:16
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2025
@metamaskbot metamaskbot added release-7.60.0 Issue or pull request that will be included in release 7.60.0 release-7.59.0 Issue or pull request that will be included in release 7.59.0 and removed release-7.60.0 Issue or pull request that will be included in release 7.60.0 labels Nov 11, 2025
@metamaskbot
Copy link
Collaborator

Missing release label release-7.59.0 on PR. Adding release label release-7.59.0 on PR and removing other release labels(release-7.60.0), as PR was cherry-picked in branch 7.59.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-M team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove secondary dropdown in Stocks tab

4 participants