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

follow up on Collection Activity Tab // limit number of events in query #5388

Open
3 tasks done
daiagi opened this issue Mar 26, 2023 · 24 comments
Open
3 tasks done

follow up on Collection Activity Tab // limit number of events in query #5388

daiagi opened this issue Mar 26, 2023 · 24 comments
Labels
A-collection work being done collection view A-rmrk2 bug Something isn't working p3 non-core, affecting less than 40%

Comments

@daiagi
Copy link
Contributor

daiagi commented Mar 26, 2023

to sum it up, left overs for next PR:

@daiagi daiagi mentioned this issue Mar 26, 2023
21 tasks
@exezbcz
Copy link
Member

exezbcz commented Mar 26, 2023

scroll position reset when switching tabs (items/activity)

from the bottom of this comment:
#5345 (comment)

  • can we make it so the switch between items and activity does not reset the scroll position
  • it's better when its seamless

@daiagi
Copy link
Contributor Author

daiagi commented Mar 27, 2023

by @roiLeo : #5345 (review)

  • I would remove import { set } from 'vue'
  • make has-text-k-blue & has-text-k-grey global variables class
  • query doesn't have limit on events
  • put composable (useReplaceUrl) in composable folder
  • relative path
  • duplicate css code & some bad selector (.background-color??)

@yangwao yangwao added p2 core functionality, or is affecting 60% of app A-collection work being done collection view labels Mar 27, 2023
@yangwao
Copy link
Member

yangwao commented Mar 27, 2023

@daiagi
Copy link
Contributor Author

daiagi commented Mar 27, 2023

@roiLeo
About the point you've raised that there is no limit on events
I think it is necessary to get all events in order to have correct flippers info
I guess a way to reduce data is to get all buy events
And paginate the rest as user scrolls down the list

But I don't that will make much difference in query size

Wdyt?

@roiLeo
Copy link
Contributor

roiLeo commented Mar 27, 2023

@roiLeo About the point you've raised that there is no limit on events I think it is necessary to get all events in order to have correct flippers info I guess a way to reduce data is to get all buy events And paginate the rest as user scrolls down the list

Yes! Limit 20-50 and paginate the rest. (we had same stuff in #5038)

But I don't that will make much difference in query size

Wdyt?

Let's imagine I make 100k+ "LIST" event, client side won't be able to handle all this data.

@daiagi
Copy link
Contributor Author

daiagi commented Mar 27, 2023

OK. Just to clarify...
You do agree that all buy events will still be needed to be fetched immediately, right?

Let's imagine I make 100k+ "LIST" event, client side won't be able to handle all this data.

Yes. Of course

@vikiival what is your take on this? What would be most efficient way?

@roiLeo
Copy link
Contributor

roiLeo commented Mar 27, 2023

OK. Just to clarify... You do agree that all buy events will still be needed to be fetched immediately, right?

for me not necessarily. Is it for the graph? this would be the events over a given period of time.

@daiagi
Copy link
Contributor Author

daiagi commented Mar 27, 2023

The graph too I guess
But I was thinking about flippers tab, for that I need to know about every time an nft switch hands, so that means all buy events

@vikiival would it make sense to process holders and flippers on rubick and add these attributes to collection Entity? Especially flippers

By the way, on previous collection activity minters who sold their nft are also dubbed flippers, I disagree with that.
I think only someone who bought and sold is a flipper.
For now I kept this as it was before though

@daiagi
Copy link
Contributor Author

daiagi commented Mar 28, 2023

by @roiLeo : #5345 (review)

* I would remove `import { set } from 'vue'`

* make `has-text-k-blue` & `has-text-k-grey` global [variables](https://bulma.io/documentation/customize/variables/) class     

* put composable (`useReplaceUrl`) in composable folder

* relative path

* duplicate css code & some bad selector (`.background-color`??)

all done.

outstanding issues:

@daiagi
Copy link
Contributor Author

daiagi commented Mar 30, 2023

scroll position reset when switching tabs (items/activity)

Fixed by #5416

@daiagi
Copy link
Contributor Author

daiagi commented Mar 30, 2023

@vikiival @roiLeo I think creating a userEntity is the way forward
A userEntity will have all the data required for holders flippers tab and will take the load of calculating it off the front end.
Does that make sense?

Thank you

@roiLeo
Copy link
Contributor

roiLeo commented Mar 30, 2023

@vikiival @roiLeo I think creating a userEntity is the way forward A userEntity will have all the data required for holders flippers tab and will take the load of calculating it off the front end. Does that make sense?

Yes! kodadot/rubick#52 & kodadot/rubick#56 (maybe kodadot/rubick#157 for a start)
Feel free to try to write new schema, I can help you if you need to setup indexer project.

@daiagi
Copy link
Contributor Author

daiagi commented Mar 30, 2023

it will take some time as I'm in vacation until 9th of April

If you are interested in getting it going feel free to, otherwise I will try my strength in it when I'm back

@vikiival
Copy link
Member

9th of April

Will take that time to design new Schema 2.0 😅

@yangwao
Copy link
Member

yangwao commented Apr 7, 2023

Yes! kodadot/rubick#52 & kodadot/rubick#56 (maybe kodadot/rubick#157 for a start)
limit number of events in query, paginate events table

Only this is left in this issue?

@yangwao yangwao changed the title follow up on Collection Activity Tab follow up on Collection Activity Tab // limit number of events in query Apr 7, 2023
@roiLeo
Copy link
Contributor

roiLeo commented Apr 7, 2023

limit number of events in query, paginate events table

Only this is left in this issue?

Yes imo same stuff as #5540

@yangwao
Copy link
Member

yangwao commented Apr 9, 2023

this is related I guess

Good for resolver?

@yangwao yangwao added p1 preventing everyone from using app bug Something isn't working and removed p2 core functionality, or is affecting 60% of app labels Apr 9, 2023
@yangwao
Copy link
Member

yangwao commented Apr 10, 2023

hey @daiagi can we look on this as we want to launch rmrk2 bug hunting

@daiagi
Copy link
Contributor Author

daiagi commented Apr 10, 2023

hey @yangwao
it is waiting on this:

once we can fetch holder/flippers info as part of new userEntity, the need to fetch all events on FE in order to calculate them will be eliminated. then we can paginate the events table in activity tab

That should resolve all heavy loading isuues in activity tab

@yangwao
Copy link
Member

yangwao commented Apr 11, 2023

it is waiting on this:

and would be possible make lazy loading for that scroll table for now? I think that would save day till then? Because it's last thing we want to launch bug hunting for rmrk2 and it's quite issue for collection where are lot of owners, like >100.

@daiagi
Copy link
Contributor Author

daiagi commented Apr 12, 2023

events table is already lazy loaded
I've lazy loaded holders/flippers tabs in #5608 and seeing performance improvement

@yangwao yangwao added p2 core functionality, or is affecting 60% of app A-rmrk2 and removed p1 preventing everyone from using app labels Apr 17, 2023
@yangwao yangwao added p3 non-core, affecting less than 40% and removed p2 core functionality, or is affecting 60% of app labels Apr 25, 2023
@daiagi daiagi mentioned this issue Jun 1, 2023
6 tasks
@JustLuuuu
Copy link
Member

@roiLeo can we close this?

@roiLeo
Copy link
Contributor

roiLeo commented Aug 1, 2024

@roiLeo can we close this?

Im not aware of current implementation, it was needed to limit number of events in query so user won't face potential bug where there is more than 1k events.

Feel free to close it.
If a bug occur on a big collection it could be related to that one

@vikiival
Copy link
Member

vikiival commented Aug 1, 2024

Still an issue but we would need resolver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-collection work being done collection view A-rmrk2 bug Something isn't working p3 non-core, affecting less than 40%
Projects
None yet
Development

No branches or pull requests

6 participants