Skip to content

Commit fa0e7de

Browse files
authored
controllers/crates: default to sort by recent downloads
"Browse All Crates" is the most prominent link in the menu bar, displayed on all pages. Before this change, this link would present the user with (mostly) irrelevant crates, as it was sorted alphabetically: crates like `a`, `a-`, `a0`, etc. With this change, the list is now sorted to present the most downloaded crates first. `/keywords/:term` already defaults to that same order.
1 parent c921fd3 commit fa0e7de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/crates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default class CratesController extends Controller {
99
queryParams = ['page', 'per_page', 'sort'];
1010
@tracked page = '1';
1111
@tracked per_page = 50;
12-
@tracked sort = 'alpha';
12+
@tracked sort = 'recent-downloads';
1313

1414
@reads('model.meta.total') totalItems;
1515
@pagination() pagination;

0 commit comments

Comments
 (0)