nft-gallery
nft-gallery copied to clipboard
Sorting in Gallery/Collections - revisited
we've had some issues with multiple sorting options before, the feature got introduced here:
- https://github.com/kodadot/nft-gallery/pull/3067
later was fixed (in a hacky way) to not allow conflicting options at once (such as price high to low and price low to high at once) here:
- https://github.com/kodadot/nft-gallery/pull/3325
some questions / things to figure out before this can be properly labeled, picked up, and refined:
- Even though, passing multiple search params was allowed, what is the desired outcome? As an example, @roiLeo comment from #3067
Tested on /rmrk/explore?page=1&tab=GALLERY&search=&sort=PRICE_DESC&sort=EMOTES_COUNT_DESC&listed=true
what do you actually expect to see there? Maybe it's just me but I'm having hard time imaging the desired result. Is it first sorted by price? (desc) and then sorted by number of emotes...? I actually don't know what should the fetched data look like. Do we really want this? I think I'm not alone in this confusion, but please, provide your feedback. Right now, to me it seems, that the first param is the one which is sorting and the second one is not taken into consideration.
- thanks to @cryptodamsky comment from #3507:
Ok, i’m just saying that the term "serial number ascending" doesn’t make sense to end user AND it doesn’t work when I click it.
seems that Serial Number Ascending, indeed, isn't working correctly, although it is sorted in some way, it's not an intuitive one + I'm not really sure on which basis are the serial numbers attached to the NFTs and why would that be interesting to anybody. I don't think more is necessarily better in this case, the filter has too many options already.
I'm not saying we have to do it like this, but some inspiration, with many less options, and in my opinion, cleaner UI (I've cut out filtering which we don't provide):
OpenSea search | LooksRare search |
---|---|
![]() |
![]() |
Tested on /rmrk/explore?page=1&tab=GALLERY&search=&sort=PRICE_DESC&sort=EMOTES_COUNT_DESC&listed=true
what do you actually expect to see there? Maybe it's just me but I'm having hard time imaging the desired result. Is it first sorted by price? (desc) and then sorted by number of emotes...?
yes!
Do we really want this? I think I'm not alone in this confusion, but please, provide your feedback. Right now, to me it seems, that the first param is the one which is sorting and the second one is not taken into consideration.
if the second one is not taken in count then we might check if there isn't any hardcoded default orderBy. I also find it hard to see a use for this double sorting, from #842 use case was:
I would like to sort by long time no interaction and sort it from the most expensive.
Ok, i’m just saying that the term "serial number ascending" doesn’t make sense to end user AND it doesn’t work when I click it.
Serial number as been introduce in #2727 to temporary fix /rmrk/collection/FC77C33AB229A2056A-BTFLSUZANN
sorting
(btw it seems i can't render collection items anymore)
I'm not saying we have to do it like this, but some inspiration, with many less options, and in my opinion, cleaner UI (I've cut out filtering which we don't provide): OpenSea search LooksRare search
👀