Commit 8a1991b
authored
feat: Add tokens full page (#21628)
## **Description**
This PR implements a full-screen Tokens view accessible from the
wallet's Tokens tab, providing users with an expanded view of their
token portfolio. The feature includes a "View all tokens" button that
appears when the token list is truncated, allowing users to navigate to
a dedicated full-screen tokens page with enhanced navigation and layout.
**Key improvements:**
- **Enhanced User Experience**: Users can now access a full-screen
tokens view for better visibility and interaction
- **Improved Navigation**: Seamless navigation between the tab view and
full-screen view
- **Better Layout**: Full-screen view utilizes the entire screen real
estate for token management
- **Consistent UI**: Maintains existing functionality while providing
expanded access
## **Changelog**
CHANGELOG entry: Added full-screen Tokens view accessible via "View all
tokens" button in wallet
## **Related issues**
Fixes:
https://consensyssoftware.atlassian.net/jira/software/c/projects/DSYS/boards/1888?selectedIssue=DSYS-245
## **Manual testing steps**
```gherkin
Feature: Tokens Full Page
Scenario: User can access full-screen tokens view
Given the user is on the Wallet page
And the Tokens tab is selected
And there are more tokens than the display limit
When the user clicks on "View all tokens" button
Then they should be navigated to the Tokens Full View page
And the page should display all tokens in a full-screen layout
And the back button should return them to the wallet
Scenario: User can navigate back from full-screen view
Given the user is on the Tokens Full View page
When the user clicks the back button
Then they should return to the Wallet page
And the Tokens tab should remain selected
Scenario: Full-screen view maintains existing functionality
Given the user is on the Tokens Full View page
When the user interacts with tokens (refresh, filter, sort)
Then all existing token functionality should work as expected
And the UI should be consistent with the tab view
```
## **Screenshots/Recordings**
### **Before**
### **After**
Tokens Full View
https://github.com/user-attachments/assets/c05ea851-ef7f-46f9-8092-2104b6805159
Tokens Tab still functional
https://github.com/user-attachments/assets/c8dc808d-9f4f-46db-83e4-9f691b44112d
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds a full-screen Tokens view accessible via a new "View all tokens"
button and route, with layout/refactors to token list, control bar, and
Add Asset header plus tests and i18n.
>
> - **Wallet UI**:
> - **Full-screen Tokens view**: New `Views/TokensFullView` with
header/back; wired into `MainNavigator` and
`Routes.WALLET.TOKENS_FULL_VIEW`.
> - **Token list UX**: `TokenList` gains `maxItems`, optional
`flashListProps`, and a "`wallet.view_all_tokens`" button that navigates
to `TokensFullView`.
> - **Tokens layout**: `UI/Tokens` supports `isFullView` (padding/safe
area), passes `flashListProps`, and uses design-system `Box`/Tailwind;
progressive loading unchanged.
> - **Controls/Styling**:
> - `TokenListControlBar` and shared `BaseControlBar` accept optional
`style` prop for outer wrapper spacing.
> - Minor bottom sheet wrapper cleanup in token filter/sort sheets.
> - **Add Asset**:
> - Replaces navbar options with `BottomSheetHeader` (back button/title)
in `Views/AddAsset`.
> - **Navigation**:
> - Registers `TokensFullView` and moves `AddAsset` stack entry; updates
snapshots.
> - **Tests/I18n**:
> - New `TokensFullView.test.tsx`; updates to `Tokens` and `AddAsset`
tests/snapshots.
> - Adds `wallet.view_all_tokens` string in `en.json`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9ccc10f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent c81a7cd commit 8a1991b
File tree
19 files changed
+873
-227
lines changed- app
- components
- UI
- Tokens
- TokenListControlBar
- TokenList
- TokensBottomSheet
- Views
- AddAsset
- __snapshots__
- TokensFullView
- locales/languages
19 files changed
+873
-227
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | 200 | | |
205 | 201 | | |
206 | 202 | | |
| |||
943 | 939 | | |
944 | 940 | | |
945 | 941 | | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
946 | 952 | | |
947 | 953 | | |
948 | 954 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
41 | 59 | | |
42 | 60 | | |
43 | 61 | | |
| |||
0 commit comments