From 8cc85a47996e64238314f8dd69f77dc47d721215 Mon Sep 17 00:00:00 2001 From: Brian August Nguyen Date: Tue, 25 Nov 2025 16:13:03 -0800 Subject: [PATCH 1/5] chore: Updated ButtonFilters on activity page (#23285) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR updates the ButtonFilters on the activity page to be using the temp ButtonFilter component ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/jira/software/c/projects/MDP/boards/2972?assignee=62afb43d33a882e2be47c36f&selectedIssue=MDP-411 ## **Manual testing steps** ```gherkin Feature: ButtonFilter in Activity page Scenario: user navigates to Activity page Given initial state When user clicks on different tabs Then they should see the same ButtonFilters ``` ## **Screenshots/Recordings** ### **Before** ### **After** https://github.com/user-attachments/assets/71cb36a8-2288-402a-ac6c-abf831487f9d ## **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. ## **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] > Replaces legacy/custom filter buttons with the shared ButtonFilter component in PerpsTransactionsView and Ramp OrdersList, updating layout/styling and snapshots. > > - **UI**: > - **Perps** (`PerpsTransactionsView.tsx`): Replace `Button` tabs with `ButtonFilter` (`size: Md`) and render labels as children. > - **Ramp - OrdersList** (`OrdersList.tsx`): Remove custom `FilterButton`/legacy `Button` in favor of `ButtonFilter`; wrap header in `Box` with Tailwind spacing; set `size: Md`; add accessibility labels; adjust horizontal `ScrollView` content spacing. > - **Styles** (`OrdersList.styles.ts`): Remove unused `filters` style. > - **Tests**: > - Update snapshots for `OrdersList` and `ActivityView` to reflect `ButtonFilter` structure and new header layout. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3a6fdd3003a6928f78548c39855414c69963c1ad. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- .../PerpsTransactionsView.tsx | 17 +- .../Views/OrdersList/OrdersList.styles.ts | 7 - .../Views/OrdersList/OrdersList.tsx | 73 +- .../__snapshots__/OrdersList.test.tsx.snap | 4898 +++++++++++++---- .../__snapshots__/index.test.tsx.snap | 696 ++- 5 files changed, 4505 insertions(+), 1186 deletions(-) diff --git a/app/components/UI/Perps/Views/PerpsTransactionsView/PerpsTransactionsView.tsx b/app/components/UI/Perps/Views/PerpsTransactionsView/PerpsTransactionsView.tsx index b4fa29dec3f..e81c6dda770 100644 --- a/app/components/UI/Perps/Views/PerpsTransactionsView/PerpsTransactionsView.tsx +++ b/app/components/UI/Perps/Views/PerpsTransactionsView/PerpsTransactionsView.tsx @@ -36,10 +36,8 @@ import { formatDateSection } from '../../utils/formatUtils'; import { styleSheet } from './PerpsTransactionsView.styles'; import { usePerpsMeasurement } from '../../hooks/usePerpsMeasurement'; import { TraceName } from '../../../../../util/trace'; -import Button, { - ButtonSize, - ButtonVariants, -} from '../../../../../component-library/components/Buttons/Button'; +import ButtonFilter from '../../../../../component-library/components-temp/ButtonFilter'; +import { ButtonSize } from '@metamask/design-system-react-native'; const PerpsTransactionsView: React.FC = () => { const { styles } = useStyles(styleSheet, {}); @@ -225,14 +223,15 @@ const PerpsTransactionsView: React.FC = () => { }; return ( -