harmony-one / bounties

Bounty program is to help the community take part in the development of the Harmony blockchain. It covers from core feature to validator tooling, from dApp development to DeFi integration.
MIT License
59 stars 23 forks source link

Explorer Long Query #78

Open y04nqt opened 2 years ago

y04nqt commented 2 years ago

Description

If the inventory tab has a lot of entries, the load time on retrieval is very long without any user feedback.

Context

I went to checkout a wallet's activity and they had a huge inventory, then my screen provide zero feedback that it was fetching something. I only knew because I understand the background process, but unfortunately not everyone has this context. We should provide some user feedback to optimize the process using pagination of results or limit based on some criteria

Acceptance Criteria

Reward

USD $500 in ONE token

y04nqt commented 2 years ago

Screen Shot 2021-10-07 at 11 09 30 AM

chase1745 commented 2 years ago

Hi, I was starting to take a look into this and wanted to check and see if its still available with a bounty?

Elaine-X commented 2 years ago

I am very interested in this, can you send the project address and more information

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 2062.4153 ONE (501.0 USD @ $0.24/ONE) attached to it.

LeoHChen commented 2 years ago

this bounty is funded

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 264 years, 10 months from now. Please review their action plans below:

1) shad-k has started work.

Hi I would like to take a go at this. Would you be able to point me to the project repo? 2) bootleg773 has started work.

Improve the Load times? And figure out what to do in this contest? 3) makarami has started work.

Please help meet you 0x31553Cc4D409f2A9e69D439FdFfe3138b3FC85d8

Learn more on the Gitcoin Issue Details page.

agileurbanite commented 2 years ago

Which repo is this at?

agileurbanite commented 2 years ago

Is this for explorer v2 or harmony dashboard?

y04nqt commented 2 years ago

This is explorer v2

jotagep commented 2 years ago

I have a doubt, for this bounty. what important is keep total inventory assets on tab title? Because if its important to keep it there, we need fetch all assets first, we can't change postgres query to use pagination cause need total rows of table. Another approach that i think could be fetch all assets but just when user click on inventory tab or holder tab. And add a feedback like spinner or loader

y04nqt commented 2 years ago

I have a doubt, for this bounty. what important is keep total inventory assets on tab title? Because if its important to keep it there, we need fetch all assets first, we can't change postgres query to use pagination cause need total rows of table. Another approach that i think could be fetch all assets but just when user click on inventory tab or holder tab. And add a feedback like spinner or loader

No matter how it's presented to the user, we need to be informing the user what is happening. Whether or not the query can be optimized is something for the dev to figure out. I'm fairly certain we can make improvements here. Without changing the interface of the tab, we ought to be able to at least give indication the contents are loading in case it takes awhile. Then secondly, more than likely, we can improve the query performance. I don't have direct context to the query in question yet, but should be found in the explorer-v2 repo. I'll dig to see if I can find the direct link.

jotagep commented 2 years ago

Yes i know where is the query is in explorer-v2-backend on store folder

agileurbanite commented 2 years ago

@y04nqt can you provide a URL or an animated gif to get more information / context? I'm having trouble finding wallet activity with a huge inventory also of the ones I found they provide a loading spinner. So would love more context.

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 2062.4153 ONE (515.16 USD @ $0.24/ONE) has been submitted by:


y04nqt commented 2 years ago

https://github.com/harmony-one/explorer-v2-frontend/blob/993df55c7c6acee816af9e4a63b3475eff9b5010/src/pages/InventoryDetailsPage/InventoryDetailsPage.tsx

Here's a snippet to the page for it. I'm still searching for the example wallet I found when submitting this, thought I had saved it somewhere. I found it via the https://gov.harmony.one/#/harmony-developer-dao/proposal/QmTzRfjtR7BzW7wa5bMHDns3auQGaYhYo5bjgG3TS7k9AV purposal when skimming wallets. I am doing a click through all of these wallets to find the example.

y04nqt commented 2 years ago

I went through the entire list, couldn't find much so I resorted to going to Davinchi itself. I was able to replicate a bug, maybe not this particular one in question but similar issue. https://explorer.harmony.one/address/0x1548c6227cbd78e51eb0a679c1f329b9a5a99beb Click around on the tabs and see after a few clicks things start to lock up. I think it may be reasonable to assume, we have something that gets called and is has a big job to do, then clicking off of it causes disruption to the interface.

developerfred commented 2 years ago

thanks @y04nqt

jotagep commented 2 years ago

I submit my PR👌

championpaddler commented 2 years ago

@y04nqt Is this issue still open ?

y04nqt commented 2 years ago

The issue is still open and accepting PRs. Jotagep pushed up some code and is working on more. I'm sure others may also be working on this as well. Feel free to shoot up a PR if you have some good fixes.

ferasawadi commented 2 years ago

is this still open ?