Sort crates by number of downloads in the last 90 days #702
Labels
C-enhancement ✨
Category: Adding new behavior or a change to the way an existing feature works
E-has-mentor
E-help-wanted
Part of RFC 1824, rust-lang/rust#41616.
The decision made in RFC 1824 was to change the default ordering for crates within keywords and categories to be the number of downloads in the last 90 days rather than the number of downloads for all time.
An implementation question unresolved in that RFC: should we change the current sort option "Downloads" to always be "Downloads in the last 90 days" and remove the ability to sort by all-time downloads at all (Option 1), or should we add a new option to all sorting menus for downloads in the last 90 days and keep the option to sort by all-time downloads (Option 2)?
What needs to be done for either option:
For pages like crates in the category "Data structures" or crates with the keyword "ffi" (and notably NOT for a search result page which should remain sorted by relevance by default, or the Browse All Crates page, which should remain sorted alphabetically by default):
What needs to be done if we go with Option 1 (replacing sorting by all-time downloads with sorting by downloads in the last 90 days):
sort=downloads
query parameter, and just change what it does to the diesel query here and hereWhat needs to be done if we go with Option 2 (adding sorting by downloads in the last 90 days to the sorting options and keeping sorting by all-time downloads as well):
sort=recent-downloads
or similar and add code to test for that value and handle it in diesel here and hereAlso add tests no matter what we go with.
Please weigh in if you have opinions on which option we go with!
If you'd like to work on this and there haven't been any comments, you get to pick which option we go with! Please ask me if you have any questions :)
The text was updated successfully, but these errors were encountered: