Plots2: /tags is (wrongly) alphabetically sorted...? need to better define defaults to see if there are issues

Created on 5 Jan 2021  Â·  13Comments  Â·  Source: publiclab/plots2

https://publiclab.org/tags?sort=followers&order=asc doesn't seem to sort by # of uses -

do wiki edits/tags bump these up, or count?

what if we show wiki count?

Possibly related to https://github.com/publiclab/plots2/pull/8935 cc @RuthNjeri

Ruby help wanted

Most helpful comment

So based on the code we have 3 ways of sorting i.e _uses_, _followers_ and _names_ and based on each selected we don't check the number of uses (unless sort=uses) so even https://publiclab.org/tags?sort=name&order=desc doesn't order according to the number uses
what do you think @jywarren should we change that to also order by the number uses for _followers_ and _names_ ? if so, do we also keep the sort by _uses_?

I agree changing the default order to desc would be great for tags...but this will mean _names_ will be ordered form z-a...do we want that...we could add a check if sort= name then do an asc order, so no biggie about this we just need to be aligned

The count def seems off looks like we are including both wikis and questions in the count.. but checking further into this. Thanks

All 13 comments

Aha! i believe its just alphabetic, for all 3 sortings. I bet we added an order() twice and the one we want is getting overloaded perhaps.

a second issue may be that it's showing 0 posts for some topics that def. have one note

Yes, looks like @akp2603's changes may be related? @cesswairimu would you mind checking this out?

noting that https://publiclab.org/tags?sort=uses&order=desc seems to work fine!

Aha! https://publiclab.org/tags?sort=followers&order=desc works! But the link is to https://publiclab.org/tags?sort=followers&order=asc -- desc vs asc!!! So let's have the default go to desc instead?

https://publiclab.org/tags?sort=name&order=asc - is what's shown when viewing https://publiclab.org/tags --

and, default view at https://publiclab.org/tags should be sorting by desc uses, i believe? Or is it most recently used? @publiclab/community-reps do you remember? Thanks, all!

I think the next step may be to make a little table of all the defaults in each state...

this would be really great documentation to have on hand!

+1 336-269-1539 / @lizbarry http://twitter.com/lizbarry / lizbarry.net

On Tue, Jan 5, 2021 at 3:36 PM Jeffrey Warren notifications@github.com
wrote:

I think the next step may be to make a little table of all the defaults in
each state...

—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/8941#issuecomment-754884311,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABHNH4IZB5IUZPA3E7CZZLSYNZ6VANCNFSM4VVW2ETA
.

Yeah sure thing, will take a look

So based on the code we have 3 ways of sorting i.e _uses_, _followers_ and _names_ and based on each selected we don't check the number of uses (unless sort=uses) so even https://publiclab.org/tags?sort=name&order=desc doesn't order according to the number uses
what do you think @jywarren should we change that to also order by the number uses for _followers_ and _names_ ? if so, do we also keep the sort by _uses_?

I agree changing the default order to desc would be great for tags...but this will mean _names_ will be ordered form z-a...do we want that...we could add a check if sort= name then do an asc order, so no biggie about this we just need to be aligned

The count def seems off looks like we are including both wikis and questions in the count.. but checking further into this. Thanks

The 'count' used is the count value of that tag as in the db

Yes, i agree the sort by name should be default a-z so asc -- good call. But the default for uses and followers should be desc, AND the default state of /tags (with no params) should be uses desc. Does that make sense?

Thanks, @cesswairimu !!!

yeah makes sense :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grvsachdeva picture grvsachdeva  Â·  3Comments

grvsachdeva picture grvsachdeva  Â·  3Comments

keshavsethi picture keshavsethi  Â·  3Comments

keshavsethi picture keshavsethi  Â·  3Comments

grvsachdeva picture grvsachdeva  Â·  3Comments