Open credomane opened 3 years ago
These closed issues might be relevant for this issue: https://github.com/ajour/ajour/issues/462 https://github.com/ajour/ajour/issues/517.
Ah. If I understand those issues then it almost sounds like, to me, that sorting is happening at the wrong time, imo.
unsorted list is something like enter search term -> score results -> chop list to top 25 -> show them. sorted list is something like enter search term -> score results -> sort results by selected column-> chop list to top 25 -> show them.
While I'm expecting enter search term -> score results -> chop list to top 25 -> sort results by selected column -> show them.
That sounds reasonable to me on what is happening and would certainly yield results like I'm seeing.
I agree - there's room for improvements on it! Ill keep this issue open so we can later tag it when its picked up. Thanks for the detailed description as well.
Why would we want to chop down the list to 25 BEFORE sorting? We will never see the bottom results when sorting by Descending on a column.
Think of the # of results in the same context as pagination. Filtering / sorting doesn't occur within the context of the current page, it happens on the entire result set. Then you page over the results in whatever sorted order.
Why would we want to chop down the list to 25 BEFORE sorting? We will never see the bottom results when sorting by Descending on a column.
I think your logic is a little faulty there. If the total results are more than 50 before displaying only 25 of them. Then sorting any column in either direction we'll never be able to see the ones in the middle, either.
Think of the # of results in the same context as pagination. Filtering / sorting doesn't occur within the context of the current page, it happens on the entire result set. Then you page over the results in whatever sorted order.
If there was a way to page over the results in whatever sorted order
in ajour then I'd agree that this is how the sorting of the results should be done and this ticket would never have existed. Since there are no options for pagination then only the displayed items should be sorted. Maybe my original explanation was not good enough?
At any time there are technically two lists of items. The full result set and the displayed result set. Sorting the entire result set only makes sense if there are options for switching pages so you can look at other results past the first 25 (or whatever the Results
dropdown is set at). Since ajour currently doesn't have any pagination options to change pages then my expectation is for sorting to only sort the displayed result.
Here are some picture with explanations:
I search for "plater" and limit the results 25 as in the below screenshot. With the way the UI is presented (no pagination buttons to switch "pages" ) and worded (Results: 25
not something like Display 25 per page
), to me, it doesn't work as expected. There is no indicator anywhere in the UI that there are more that 25 results be that 30, 100, 9001, or something else. Ajour makes it appear that the entire result set is 25 items for "plater", period, no exceptions.
Yes, you and I both know that there are actually more than 25 results but the UI does nothing to hint at that. So If I click on any of the column headers to sort I expect it to sort the displayed list of 25 results. Instead what happens is the sorting is done on the full result set and get strange results like this:
I guess what I'm getting at is:
Without pagination options I, intuitively, expect sorting to occur on the displayed list.
With pagination buttons I would expect the sorting to occur on the full result set.
Speaking of strange results....what is sorting by Addon
even sorting by? I assumed it would be alphabetical by the addon's name but that doesn't appear to be the case.
@credomane Thanks for the detailed explanation. I think our implementation is fine, but I agree it is slightly confusing in presentation. We should indicate, as you mention, that its only displaying 25 out of X total addons. I can't figure out a scenario when we'd only want to sort things within the context of the displayed results vs the full list respective to filters.
And it is sorting by title properly, it's just that sorting goes from A-Za-z (we can sort on lowercase to fix this)
And it is sorting by title properly, it's just that sorting goes from A-Za-z (we can sort on lowercase to fix this)
I figured out why it was confusing me so much. I thought I had the screenshot sorting ascending but it is actually sorting descending. I didn't catch on to that and was wondering why they were in semi-random order. It was so obvious what the deal was today I dunno why I didn't notice that yesterday.
Describe the bug Sorting catalog with a search term present yields incorrect results.
To Reproduce Steps to reproduce the behavior:
catalog
tabplater
.plater
you have about 25 results.name
in ascending order.plater
is not in the list of 25 addons anymore plus these addons are not all the same addons as the unsorted list.name
in descending order.plater
is in the list again but these are again not addons that were in the unsorted list as well as the ascending sorted list.Expected behavior The original 25 addons that appear when searching for
plater
to get sorted. Not what ever is actually happening.Screenshots Shouldn't be needed but can add them if they are still desired.
Software involved Please complete the following information:
Additional context This affects the other columns in the
catalog
tab for sorting as well with a search term present.My Addons
seems to sort without issues when a search term is present.Log Output Wanted to put this into a spoiler tag so it could be minimized but github refuses to allow any formatting/new lines and the entire log becomes one giant line.