Skip to content
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(wallet-dashboard): add grid for visual assets #3758

Merged
merged 21 commits into from
Nov 7, 2024

Conversation

VmMad
Copy link
Member

@VmMad VmMad commented Oct 29, 2024

Fixes #3692
Fixes #3924

Depends on #3724

VmMad and others added 14 commits October 25, 2024 18:04
apps/wallet-dashboard/app/(protected)/assets/[objectId]/page.tsx
apps/wallet-dashboard/app/(protected)/assets/everything-else/page.tsx
apps/wallet-dashboard/app/(protected)/assets/visual-assets/[objectId]/page.tsx
apps/wallet-dashboard/app/(protected)/assets/visual-assets/page.tsx
apps/wallet-dashboard/app/(protected)/components/top-nav/TopNav.tsx
apps/wallet-dashboard/app/dashboard/assets/visual-assets/[objectId]/page.tsx
@VmMad VmMad requested review from a team as code owners October 29, 2024 13:15
@VmMad VmMad added tooling Issues related to the Tooling team wallet-dashboard Issues related to the Wallet Dashboard dApp labels Oct 29, 2024
@VmMad VmMad linked an issue Oct 29, 2024 that may be closed by this pull request
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 551b48f

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-d8wifj42c.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 551b48f

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-9xgdclqqh.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 551b48f

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-riht46i97.vercel.app

@VmMad VmMad requested a review from evavirseda October 30, 2024 08:15
Copy link
Contributor

github-actions bot commented Nov 4, 2024

This pull request has been deployed to Vercel.

Latest commit: a4db526

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-33amgcgqu.vercel.app

Copy link
Contributor

github-actions bot commented Nov 4, 2024

This pull request has been deployed to Vercel.

Latest commit: a4db526

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-mdb8d913t.vercel.app

Copy link
Contributor

github-actions bot commented Nov 4, 2024

This pull request has been deployed to Vercel.

Latest commit: a4db526

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-ejjkluj06.vercel.app

@VmMad VmMad requested a review from msarcev November 5, 2024 11:00
Base automatically changed from tooling-dashboard/add-assets-layout to develop November 6, 2024 09:26
Copy link
Contributor

@marc2332 marc2332 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to actually put the review..


interface AssetCardProps {
type AssetCardProps = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you just do something like ?

Suggested change
type AssetCardProps = {
interface AssetCardProps extends Pick<VisualAssetCardProps, 'onclick' | 'onIconClick' | 'icon'> {

asset: IotaObjectData;
flexDirection?: FlexDirection;
}
} & Pick<React.ComponentProps<typeof VisualAssetCard>, 'onClick' | 'onIconClick' | 'icon'>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} & Pick<React.ComponentProps<typeof VisualAssetCard>, 'onClick' | 'onIconClick' | 'icon'>;
}

Comment on lines 20 to 33
<>
{asset.display && nftMeta && nftMeta.imageUrl && (
<VisualAssetCard
assetSrc={nftMeta?.imageUrl ?? asset?.display?.data?.imageUrl ?? ''}
assetTitle={nftMeta?.name ?? asset?.display?.data?.name}
assetType={VisualAssetType.Image}
altText={nftMeta?.name ?? (asset?.display?.data?.name || 'NFT')}
isHoverable
icon={icon}
onClick={onClick}
onIconClick={onIconClick}
/>
)}
</>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simpler, right?

Suggested change
<>
{asset.display && nftMeta && nftMeta.imageUrl && (
<VisualAssetCard
assetSrc={nftMeta?.imageUrl ?? asset?.display?.data?.imageUrl ?? ''}
assetTitle={nftMeta?.name ?? asset?.display?.data?.name}
assetType={VisualAssetType.Image}
altText={nftMeta?.name ?? (asset?.display?.data?.name || 'NFT')}
isHoverable
icon={icon}
onClick={onClick}
onIconClick={onIconClick}
/>
)}
</>
if(!asset.display || !nftMeta || !nftMeta.imageUrl){
return null
}
return (
<VisualAssetCard
assetSrc={nftMeta?.imageUrl ?? asset?.display?.data?.imageUrl ?? ''}
assetTitle={nftMeta?.name ?? asset?.display?.data?.name}
assetType={VisualAssetType.Image}
altText={nftMeta?.name ?? (asset?.display?.data?.name || 'NFT')}
isHoverable
icon={icon}
onClick={onClick}
onIconClick={onIconClick}
/>
)

Comment on lines 52 to 55
type={ButtonType.Secondary}
size={ButtonSize.Small}
{...button}
key={index}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: simply put the key as the first prop, it behaves the same but its easier to read

Suggested change
type={ButtonType.Secondary}
size={ButtonSize.Small}
{...button}
key={index}
key={index}
type={ButtonType.Secondary}
size={ButtonSize.Small}
{...button}

@VmMad VmMad requested a review from a team as a code owner November 6, 2024 10:21
Copy link
Contributor

github-actions bot commented Nov 6, 2024

⚠️ 🦋 Changesets Warning: This PR has changes to public npm packages, but does not contain a changeset. You can create a changeset easily by running pnpm changeset in the root of the IOTA repo, and following the prompts. If your change does not need a changeset (e.g. a documentation-only change), you can ignore this message. This warning will be removed when a changeset is added to this pull request.

Learn more about Changesets.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

This pull request has been deployed to Vercel.

Latest commit: 9c5032e

✅ Preview: https://apps-ui-7e4x6t8dz-iota1.vercel.app

Copy link
Contributor

github-actions bot commented Nov 6, 2024

This pull request has been deployed to Vercel.

Latest commit: 9c5032e

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-5ro8hwc9f.vercel.app

Copy link
Contributor

github-actions bot commented Nov 6, 2024

This pull request has been deployed to Vercel.

Latest commit: 9c5032e

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-qoqdj521b.vercel.app

@VmMad VmMad requested a review from marc2332 November 6, 2024 10:24
Copy link
Contributor

github-actions bot commented Nov 6, 2024

This pull request has been deployed to Vercel.

Latest commit: 9c5032e

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-f5kzaqncl.vercel.app

@marc2332 marc2332 merged commit 0d967e5 into develop Nov 7, 2024
31 checks passed
@marc2332 marc2332 deleted the tooling-dashboard/add-assets-styles branch November 7, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Issues related to the Tooling team wallet-dashboard Issues related to the Wallet Dashboard dApp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update IotaIcon in the ConnectWallet modal Style visual assets
5 participants