-
-
Couldn't load subscription status.
- Fork 1.4k
feat: Add NFTs full page #21647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add NFTs full page #21647
Conversation
|
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. |
…to feat/nfts-full-page
| name="AddAsset" | ||
| component={AddAsset} | ||
| options={{ headerShown: false }} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be moved out to the main stack to work with the new asset full pages. Additionally, it should not have the bottom nav
| alignItems: 'center', | ||
| justifyContent: 'flex-start', | ||
| backgroundColor: colors.background.alternative, | ||
| backgroundColor: colors.background.section, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated based on design
|
|
||
| const NftGrid = () => { | ||
| const navigation = useNavigation(); | ||
| const NftRow = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving to a row approach for better spacing
| scrollEnabled: true, | ||
| }), | ||
| [tw], | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Different grid styling based on views
| </View> | ||
|
|
||
| {/* View all NFTs button - shown when there are more items than maxItems */} | ||
| {shouldShowViewAllButton && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be under a scrolldisabled flashlist, so its fine to stay outside
| container: { | ||
| flex: 1, | ||
| padding: 5, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing padding here for the row approach
| return tokensData && Object.keys(tokensData).length > 0; | ||
| }, [selectedNetwork, tokenListForAllChains]); | ||
|
|
||
| const updateNavBar = useCallback(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this page is moved to the main stack, these are moved to the header below
…to feat/nfts-full-page
…amask-mobile into feat/nfts-full-page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: NFT Grid Missing Prop Hides View All Button
The "View all NFTs" button will never be visible because NftGrid is used without the maxItems prop. Looking at the NftGrid component, the view-all button only displays when maxItems is provided and the total collectibles exceed maxItems. In WalletTokensTabView, NftGrid is instantiated without maxItems parameter, making the shouldShowViewAllButton condition always false. This prevents users from accessing the "View all NFTs" feature as described in the PR manual testing scenarios. The code should pass a maxItems prop to limit the display in the tab view (e.g., maxItems={3} or similar) to enable the view-all button functionality.
app/components/Views/Wallet/index.tsx#L518-L522
metamask-mobile/app/components/Views/Wallet/index.tsx
Lines 518 to 522 in a9c91a4
| const selectedInternalAccount = useSelector(selectSelectedInternalAccount); | |
| /** | |
| * Provider configuration for the current selected network | |
| */ |
|



Description
This PR adds full-page views for both Tokens and NFTs to the wallet, providing users with expanded views of their assets with improved navigation and layout.
The changes include:
Changelog
CHANGELOG entry: Added full-page views for Tokens and NFTs with "View all" navigation buttons
Related issues
Fixes: https://consensyssoftware.atlassian.net/jira/software/c/projects/DSYS/boards/1888?selectedIssue=DSYS-246
Manual testing steps
Screenshots/Recordings
Before
After
Tokens Full View
https://github.com/user-attachments/assets/4b6fe582-d5c8-4e3a-8f8e-132047cc1b9e
NFTs Full View
https://github.com/user-attachments/assets/104b9d20-eb88-429f-9a60-f6475a9eea7d
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds a full-page NFTs view with route/navigation and upgrades NftGrid to support full-view layout, "View all NFTs" action, and improved add/import flow, with styles/i18n updates and tests.
Views/NftFullViewwith header/back handling; registered inMainNavigatorasRoutes.WALLET.NFTS_FULL_VIEW(header hidden).UI/NftGrid/NftGrid.tsx):isFullView,maxItems, andflashListPropssupport; groups items into 3-column rows via customNftRowand Tailwind classes.Routes.WALLET.NFTS_FULL_VIEW) whenmaxItemsexceeded.navigation.push('AddAsset', { assetType: 'collectible' }).BaseControlBarlayout tweaks and optional full-view padding; removesnumColumns.WALLET.NFTS_FULL_VIEWtoRoutes.ts; registers inMainNavigatorand snapshot updated.CollectibleMedia.styles:textContainerbackground switched tocolors.background.section.ControlBarStyles: center-alignscontrolButtonInnerWrapper.locales/en.json: addswallet.view_all_nfts.NftFullView.test.tsx; expandedNftGrid.test.tsxfor full-view, "View all", navigation, and fetching states.Written by Cursor Bugbot for commit a9c91a4. This will update automatically on new commits. Configure here.