plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Sorting of '# of people subscribed' on /tags doesn't work

Open oorjitchowdhary opened this issue 7 years ago • 6 comments

Please describe the problem (or idea)

Sorting of # of people subscribed doesn't work.. The ascending and descending is broken and doesn't show up correctly..

sorting people error

What did you expect to see that you didn't?

By clicking on it, the sorting should have shown proper sequence of ascending and descending.

Please show us where to look

https://publiclab.org/tags?sort=followers&order=desc

What's your PublicLab.org username?

oorjit_chowdhary

Browser, version, and operating system

Chrome, Windows 10


Thank you!

Your help makes Public Lab better! We deeply appreciate your helping refine and improve this site.

To learn how to write really great issues, which increases the chances they'll be resolved, see:

https://publiclab.org/wiki/developers#Contributing+for+non-coders

oorjitchowdhary avatar Dec 11 '18 21:12 oorjitchowdhary

@publiclab/reviewers

oorjitchowdhary avatar Dec 11 '18 21:12 oorjitchowdhary

Maybe you can add where is the code for fix this and explain how do you think it can be resolved. What do you think?

vatbq avatar Dec 11 '18 22:12 vatbq

@SidharthBansal I'm trying to solve this up.. Figured out that both the # of uses and # of people subscribed use the same @order_type but still one works and the other fails.. Not able to get this clearly

oorjitchowdhary avatar Dec 12 '18 12:12 oorjitchowdhary

Create PR for the one which works. Think about the second issue in second pr. Keeping modularity into mind.

On Wed, Dec 12, 2018 at 5:59 PM Oorjit Chowdhary [email protected] wrote:

@SidharthBansal https://github.com/SidharthBansal I'm trying to solve this up.. Figured out that both the # of uses and # of people subscribed use the same @order_type but still one works and the other fails.. Not able to get this clearly

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4271#issuecomment-446571310, or mute the thread https://github.com/notifications/unsubscribe-auth/AUACQ4UZOXFJKdh9NqrbTSGzGd2N5Mpuks5u4Pa2gaJpZM4ZOTDX .

SidharthBansal avatar Dec 12 '18 12:12 SidharthBansal

No.. actually I meant.. on the live PL site.. sorting of # of uses works well but # of subscriptions shows an error... I haven't made any changes yet

oorjitchowdhary avatar Dec 12 '18 12:12 oorjitchowdhary

@oorjitchowdhary, The problem was in the order_string function. It was ordering the tags array depending on "name" but it was supposed to order it according to number of followers of a particular tag, which is given by Tag.followers_count. I have made a PR to fix these. See if that looks good ! Thank you so much!

shubhscoder avatar Jan 05 '19 08:01 shubhscoder