-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: nft list getting cut off (#1829)
- Closes #1779 - Closes FE-1328 # Summary - Added a general loading state for the entire NFT list for when the account data is still loading - Fixed NFT image collapsible loading state not matching the sizes of NFT images later displayed - Fixed NFT Image list getting cut off # Checklist - [x] I've added error handling for all actions/requests, and verified how this error will show on UI. (or there was no error handling) - [x] I've reviewed all the copy changed/added in this PR, using AI if needed. (or there was no copy changes) - [x] I've included the reference to the issues being closed from Github and/or Linear (or there was no issues) - [x] I've changed the Docs to reflect my changes (or it was not needed) - [x] I've put docs links where it may be helpful (or it was not needed) - [x] I checked the resulting UI both in Light and Dark mode (or no UI changes were made) - [x] I **reviewed** the **entire PR** myself (preferably, on GH UI) --------- Co-authored-by: Luiz Gomes <8636507+LuizAsFight@users.noreply.github.com> Co-authored-by: LuizAsFight <felipebolsonigomes@gmail.com>
- Loading branch information
1 parent
e35cee4
commit 7236697
Showing
9 changed files
with
173 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"fuels-wallet": patch | ||
--- | ||
|
||
fix: nft list getting cut off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/app/src/systems/Account/components/BalanceNFTs/NFTImageLoading.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { cssObj } from '@fuel-ui/css'; | ||
import { Box, ContentLoader } from '@fuel-ui/react'; | ||
|
||
export function NFTImageLoading({ size = 89 }: { size?: number }) { | ||
return ( | ||
<Box | ||
css={cssObj({ | ||
overflow: 'hidden', | ||
borderRadius: '10px', | ||
width: `${size}px`, | ||
height: `${size}px`, | ||
})} | ||
> | ||
<ContentLoader width={size} height={size} viewBox={`0 0 ${size} ${size}`}> | ||
<rect x="0" y="0" rx="0" ry="0" width={size} height={size} /> | ||
</ContentLoader> | ||
</Box> | ||
); | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/app/src/systems/Account/components/BalanceNFTs/NFTListItemLoading.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { cssObj } from '@fuel-ui/css'; | ||
import { Box } from '@fuel-ui/react'; | ||
import { NFTImageLoading } from './NFTImageLoading'; | ||
import { NFTTitleLoading } from './NFTTitleLoading'; | ||
|
||
export function NFTListItemLoading() { | ||
return ( | ||
<Box | ||
css={cssObj({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '8px', | ||
})} | ||
> | ||
<NFTImageLoading /> | ||
<NFTTitleLoading /> | ||
</Box> | ||
); | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/app/src/systems/Account/components/BalanceNFTs/NFTTitleLoading.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { cssObj } from '@fuel-ui/css'; | ||
import { Box, ContentLoader } from '@fuel-ui/react'; | ||
|
||
export function NFTTitleLoading({ height = 18 }: { height?: number }) { | ||
return ( | ||
<Box | ||
css={cssObj({ | ||
overflow: 'hidden', | ||
borderRadius: '6px', | ||
width: '89px', | ||
height: `${height}px`, | ||
})} | ||
> | ||
<ContentLoader | ||
width="89px" | ||
height={height ?? '100%'} | ||
viewBox={`0 0 89 ${height}`} | ||
> | ||
<rect x="0" y="0" rx="0" ry="0" width="89" height="18" /> | ||
</ContentLoader> | ||
</Box> | ||
); | ||
} |
1 change: 1 addition & 0 deletions
1
packages/app/src/systems/Account/components/BalanceNFTs/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const BALANCE_NFTS_TAB_HEIGHT = 244; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters