kodadot / nft-gallery

Generative Art Marketplace
https://koda.art
MIT License
634 stars 361 forks source link

Going back from Item Preview to Collection Preview messes up URL #9440

Closed JustLuuuu closed 7 months ago

JustLuuuu commented 7 months ago

Idk how to explain it, so I made a video. I was checking Echo collection with the "art view" filter on. Once I opened a random NFT to check it and then returned back to the collection view - some NFTs from the collection view disappeared. I did it again and all NFTs in the collection disappeared.

Check the video:

Also, check how the URL is changing. Probably that's the problem.

https://github.com/kodadot/nft-gallery/assets/104380776/53c69f55-20aa-4787-a4cc-105a48a5f0f7

JustLuuuu commented 7 months ago

Its still happening.

To test: Open any collection and start opening random NFTs, you can start in the middle, end, anywhere, and then always click back. Look carefully at the URL. At one point, the URL will get "messed" to show only "page=3" or "page=4"....

Like here in the video: Its annoying because it happens a lot.

https://github.com/kodadot/nft-gallery/assets/104380776/7b551cb0-4b65-4d5b-8bde-e067abd14723

hassnian commented 7 months ago

👋

kodabot commented 7 months ago

ASSIGNED ISSUES LIMIT REACHED - @hassnian, you have been already assigned with 5 issues: 6955,8163,8890,9173,9502,9476,9183. Finish one of them in order to get more issues assigned!

hassnian commented 7 months ago

@JustLuuuu hmm we've got that button that loads the previous page, or is supposed to have the infinite scroll ?

CleanShot 2024-02-22 at 17 42 05@2x

don't know if its done this way for some reason

@roiLeo iirc you commented something regarding this button

hassnian commented 7 months ago

@daiagi https://github.com/kodadot/nft-gallery/issues/9440#issuecomment-1959386147 any idea ?

daiagi commented 7 months ago

any idea ?

yes it because of of page url param

reproduce

a. scroll all the way to the bottom b. click on last nft

image

c. click back d. SURPRISE! :open_mouth:

my thoughts are: a. clear this param on component unmounted (grid component i guess) b. fix scrolling, when navigating to page n, all pages 0 => n should be loaded

JustLuuuu commented 7 months ago

@JustLuuuu hmm we've got that button that loads the previous page, or is supposed to have the infinite scroll ?

haha to be honest I never noticed that button and never used it. I guess I'm not the only one. But once you are on the page with all NFTs and you open an NFT and go back, I expect to be on the same page - will all NFTs. 🚀

kodabot commented 7 months ago

ASSIGNED - @daiagi 🔒 LOCKED -> Sunday, February 25th 2024, 13:57:18 UTC -> 36 hours