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(series): nft top collection #803

Merged
merged 30 commits into from
Oct 5, 2021

Conversation

roiLeo
Copy link
Contributor

@roiLeo roiLeo commented Sep 27, 2021

⚠️ WORK IN PROGRESS ⚠️
Some of the code is dirty (Rankings/utils.ts) and need refatoring/rework.
I'm not sure if I got the right 7d% & 30d% formula (need some verification).

Brief

New page/component Rankings

PR type

  • Feature

Before submitting this PR, please make sure:

  • Code builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've didn't break any original functionality
  • I've posted screenshot of demonstrated change in this PR

Optional

  • I've tested it on mobile and everything responsive doesn't work on image

Need to test

  • verification of volume price
  • verification of floor price
  • verification of 7d%/30d% data

Rework

  • 7d%/30d% Formula:
    As if t_0 (price now) & t_7 (price 7d ago) so:
    price_change(%) = ((price(t_0) - price(t_24)) / price(t_0)) * 100

What's new? (may be part of changelog)

Screenshot

Screenshot 2021-09-30 at 11-35-31 KodaDot Kusama NFT Market explorer

@roiLeo roiLeo marked this pull request as draft September 27, 2021 06:37
src/components/Rankings/RankingsTable.vue Outdated Show resolved Hide resolved
src/components/Rankings/RankingsTable.vue Outdated Show resolved Hide resolved
public meta: NFTMetadata = emptyObject<NFTMetadata>()

async created() {
await this.fetchCollectionsRankings()
Copy link
Member

Choose a reason for hiding this comment

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

Maybe check the speed of the app with and without await here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same speed with and without ~3800ms

src/components/Rankings/RankingsTable.vue Outdated Show resolved Hide resolved
@yangwao
Copy link
Member

yangwao commented Sep 28, 2021

Added right issue to desc #587 however #586 was just initial draft 😄

@yangwao
Copy link
Member

yangwao commented Oct 1, 2021

Should we start testing it? 👀
This will be rocket fuel for KodaDot 🚨

@roiLeo
Copy link
Contributor Author

roiLeo commented Oct 1, 2021

Should we start testing it? 👀 This will be rocket fuel for KodaDot 🚨

Well, problem is %7d & %30d stats seems wrong as they will always be green or null.
Currently to calculate percentage over 7 days, I compare traded volume over 7 days on total volume, this will never be negative.

@yangwao yangwao marked this pull request as ready for review October 1, 2021 09:20
@yangwao
Copy link
Member

yangwao commented Oct 1, 2021

I would add addressable rows to address-bar, ?rows=100 ? :)
image

@yangwao
Copy link
Member

yangwao commented Oct 1, 2021

I was thinking if we could make it more asynchronously, so each row would be own query to have it feel less blocking on frontend?

Or Viki proposed just fetch name of collections and then fetch data for collections as separate query?

@roiLeo
Copy link
Contributor Author

roiLeo commented Oct 1, 2021

I was thinking if we could make it more asynchronously, so each row would be own query to have it feel less blocking on frontend?

Or Viki proposed just fetch name of collections and then fetch data for collections as separate query?

I don't think this will resolve loading time. IMO, problem comes from the query that returns all the data, to reduce it we could sort by rank directly from graphql query and add pagination (first & offset).

@yangwao
Copy link
Member

yangwao commented Oct 1, 2021 via email

@yangwao
Copy link
Member

yangwao commented Oct 4, 2021

Oh re: naming
We've been chatting about the naming of this feature.
We've agreed that we would go with
SERIES on nav and URL could be /series-insights

@roiLeo roiLeo changed the title feat(rankings): nft top collection feat(series): nft top collection Oct 4, 2021
@yangwao
Copy link
Member

yangwao commented Oct 4, 2021

Checking on verifications, is that okayish or still needs to be checked?

Need to test

  • verification of volume price
  • verification of floor price
  • verification of 7d%/30d% data

Checking what's left important from issue #587

Would be good to have

  • Number of different owners

Then is ready to fly, for silent update for now, so ppl can verify it is playing all right 👌 😄

@roiLeo roiLeo linked an issue Oct 5, 2021 that may be closed by this pull request
5 tasks
@roiLeo roiLeo self-assigned this Oct 5, 2021
@roiLeo roiLeo added the enhancement New feature or request label Oct 5, 2021
@yangwao
Copy link
Member

yangwao commented Oct 5, 2021

LGTM

@yangwao yangwao merged commit 3d6f8f7 into kodadot:main Oct 5, 2021
@yangwao yangwao mentioned this pull request Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ranking on collections // collectibles
3 participants