Skip to content

Add sorting to file list view with newest-first default - #502

Open
k-dannemand wants to merge 1 commit into
bornhack:developfrom
k-dannemand:add-default-sorting
Open

Add sorting to file list view with newest-first default#502
k-dannemand wants to merge 1 commit into
bornhack:developfrom
k-dannemand:add-default-sorting

Conversation

@k-dannemand

Copy link
Copy Markdown
  • Add SORT_CHOICES with 8 sorting options (newest/oldest/updated/title/popular)
  • Add 'Sort by' dropdown filter to FileFilter
  • Default to newest first (-created_at) instead of oldest first
  • Annotate hitcount when sorting by popularity
  • Frontpage ?sort= links now work (was ignored before)
  • Add 5 tests for sorting behaviour
  • API default sorting unchanged

- Add SORT_CHOICES with 8 sorting options (newest/oldest/updated/title/popular)
- Add 'Sort by' dropdown filter to FileFilter
- Default to newest first (-created_at) instead of oldest first
- Annotate hitcount when sorting by popularity
- Frontpage ?sort= links now work (was ignored before)
- Add 5 tests for sorting behaviour
- API default sorting unchanged (backwards compatible)
@tykling

tykling commented Sep 6, 2026

Copy link
Copy Markdown
Member

Just getting around to looking at this, it looks great, thank you! The only thing I could wish was that the tests actually tested the ordering, and not just the number of rows returned.

I will check it out locally and give it a whirl and get back to you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants