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

Po/nfts list frontend #382

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Po/nfts list frontend #382

wants to merge 10 commits into from

Conversation

jopedroliveira
Copy link
Contributor

This PR implements a frontend for displaying the user's NFTs.
It implements a new panel with responsive grid, that opens a modal when an item is clicked; and implements a store that fetches data every minute, or when backend emits an event.

Screen.Recording.2023-09-18.at.16.48.18.mov

@jopedroliveira jopedroliveira marked this pull request as ready for review September 18, 2023 16:06
@@ -31,6 +33,7 @@ export const TABS = [
component: Account,
icon: RequestQuoteSharpIcon,
},
{ path: "nfts", name: "NFTs", component: Nfts, icon: ImageIcon },
Copy link
Member

Choose a reason for hiding this comment

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

instead of a new sidebar item, I think NFTs should go under the Account page.

probably later with some better navigation inside it (when many items exist), but that's for later
keeping NFTs on a separate page when Account already handles native + ERC20 is very inconsistent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

About this, agree with the consistency but I don't agree that we should place everything under "Account" and mix erc20 and erc721 together, because it might become messy.
What about changing the "account" panel to "balances" or "tokens" and keep two separated pages ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no idea about where to put this. It makes sense to put it on the Account, but that would require some sort of navigation to change between ERC20 and ERC721, while at the same time, there's plenty of space on the sidebar for now.

Copy link
Member

@naps62 naps62 Sep 22, 2023

Choose a reason for hiding this comment

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

The simplest approach I was thinking of this previously was to eventually have a submenu below "Account", which could just be made with anchor links within the same page. Meaning we can either scroll down and see the NFTs, or still navigate through the sidebar. for me this is the best of both worlds

the "Accounts" tab was already called "Balances" before, and the reason for changing that was precisely because I didn't want it to be just about ERC20s, but about the account as a whole

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand that 👍 I think my point really is that the sidebar is pretty empty, so having the "NFTs" in there feels right and doesn't require extra complexity. But, I also don't think the whole ERC20/ERC721 separation

setCurrentNftDetails(undefined);
setDetailsViewOpen(false);
}}
>
Copy link
Member

Choose a reason for hiding this comment

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

I'm gonna let @gabrielpoca review the modal part since I'm not sure if:

  1. this is the approach we want to go with?
  2. the current logic plays well with the rest of the UI? (e.g.: what if we trigger the "command bar -> open settings" option while an NFT modal is open?

Copy link
Contributor

Choose a reason for hiding this comment

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

For me, the Settings are a particular type of modal, like the Command Bar, that can be opened and closed from anywhere without messing up the app's navigation. I think this modal NFT should be a page (for instance, /nfts/:id) for now. Visually, it can be a modal on top of the NFT list, as long as the settings and command bar always show up on top, but making it a page makes it so we can link to it, refresh without losing state, and avoid future problems of having way too many places where modals can be open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants