Open jesus2099 opened 9 years ago
Using the default order for the newly selected column makes sense to me. Can you give me examples of other applications that exhibit the behavior you want? On Nov 5, 2015 10:22 AM, "PATATE12" notifications@github.com wrote:
Let’s say you have clicked Installed to sort by descending download times. Now you click the next column (Ratings I guess), it will now sort ascending instead of descending. It should keep the last selected order, IMO. :)
— Reply to this email directly or view it on GitHub https://github.com/OpenUserJs/OpenUserJS.org/issues/803.
Using the default order for the newly selected column makes sense to me.
It makes sense to me too but the oujs sorting is not using defaults. Let me be more clear on what is right and what seems wrong to me. :)
https://openuserjs.org shows scripts sorted by unknown column, unknown direction. From here :
I could write all the cases but It’s becoming more and more confusing, I think now you can see my point…
Each opposite click is OK, but the problem is that the default is not used on other columns, it’s always using the same as the opposite click.
https://openuserjs.org shows scripts sorted by unknown column, unknown direction.
That would be https://openuserjs.org/?orderBy=rating&orderDir=desc I believe
1) Clicking Name is ascending (good default)
True
i) Clicking Name is descending (good opposite)
True
a) Clicking Name is ascending (good opposite) → goto 1.
True... went to 1. ...since you didn't say go back to 1.i.b. I did it anyhow and it generates:
b) Clicking Installs is ascending (NO GOOD :red_circle:)
FALSE... the URI is https://openuserjs.org/?orderBy=installs&orderDir=desc and Quack Toolsammlung is the top installed (Userscript) on the site and at the top of the list here as expected.
Try to reduce what you are experiencing down. Having that many test cases is too much.
That routine is handled currently here with the (initial) defaults... when not using any orderDir
and orderBy
QSPs and currently here with the toggling... if you can find something that is more agreeable to what you are looking for please post the logic behind it... however from here your use cases fail in the first test with a false report of NO GOOD.
So to elaborate on the current logic on a very reduced test case...
Now if you start at a QSPd URI of:
orderDir
ections are the same.If you can find some code logic that changes it to what you are expecting I'll try it out... but as far as I can tell this is intended behavior.
Another example of this is:
orderDir
ection for all table headers... as expected since the toggle (sort) routine isn't requested at this point.Ok my explanation was even less understandable than first post, sorry. :) Let's say I go to my page where I want to see latest updated. I click Last Updated. Now I want to see most downloaded, so click Installs. Here is the problem, now I see the Least installed. Same problem if I had wanted the best noted. It keeps going back and forth between best and worst and it is unusual user experience, no?
I'm tinkering with it now... I'll see if I can get it your style... but I may have to do this in a User preference to accommodate sizzle and the intended defaults... still running through some permutations... basically what you are looking for is the table headers not to use the orderDir
with the exception of if you are on the orderBy
... give me some time to ponder on it.
GH is also not cooperating very well in dev environment so difficult to test at this time.
Yes yes please take your time to think it... Compare with what you usually expect or have elsewhere. I may be mistaking so it is good when more people think it...
@sizzlemctwizzle
The commit branch above might be feasible... please give it a whirl under the stated conditions for now on dev and local pro and see if this is something that you want to implement as a site default or as a site option (or find any boogs in logic). To me the coding itself makes more sense this way although I think orderDir()
needs to be combined into this somehow... perhaps with a JSON config file.
Steps to test:
Let’s say you have clicked Installed to sort by descending download times. Now you click the next column (Ratings I guess), it will now sort ascending instead of descending. It should keep the last selected order, IMO. :)