Feature Request: Sort "My Repositories" on dashboard page by recently updated #1784

Closed
opened 2025-11-02 04:13:11 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @aswild on GitHub (May 14, 2018).

  • Git version: n/a
  • Gitea version (or commit ref): master
  • Operating system: n/a
  • Database: n/a
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (the dashboard page when signed in)
    • No
    • Not relevant
  • Log gist: n/a

I would like to be able to sort the "My Repositories" table on the Gitea home page by most recently updated (like Github does) rather than by alphabetically. An alphabetic sort isn't particularly useful, when a user has more than 15 repos it shows the same set all the time and newer active repos get buried.

The backend SearchRepositoryByName function supports several sort modes, but they're not exposed in the /repos/search API used by the JS for the widget. Hooking that up was straightfoward and I'll open a PR soon.

Passing the new parameters to the API call in the repo-search is trivial if we're willing to unconditionally change that behavior. Making it user-selectable (and persistent) would be trickier but still possible.

Originally created by @aswild on GitHub (May 14, 2018). - Git version: n/a - Gitea version (or commit ref): master - Operating system: n/a - Database: n/a - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (the dashboard page when signed in) - [ ] No - [ ] Not relevant - Log gist: n/a I would like to be able to sort the "My Repositories" table on the Gitea home page by most recently updated (like Github does) rather than by alphabetically. An alphabetic sort isn't particularly useful, when a user has more than 15 repos it shows the same set all the time and newer active repos get buried. The backend `SearchRepositoryByName` function supports several sort modes, but they're not exposed in the `/repos/search` API used by the JS for the widget. Hooking that up was straightfoward and I'll open a PR soon. Passing the new parameters to the API call in the `repo-search` is trivial if we're willing to unconditionally change that behavior. Making it user-selectable (and persistent) would be trickier but still possible.
GiteaMirror added the type/enhancement label 2025-11-02 04:13:11 -06:00
Author
Owner

@hasufell commented on GitHub (Jun 7, 2018):

👍 is the patch already in a stage where I can test it?

@hasufell commented on GitHub (Jun 7, 2018): :+1: is the patch already in a stage where I can test it?
Author
Owner

@aswild commented on GitHub (Jun 7, 2018):

@hasufell The API enhancement in #3964 is done, just waiting for the Gitea team to merge it when they're ready. You can grab that for testing right now.

Hooking the new API parameters to the GUI is easy, but there isn't a single commit you can cherry-pick right now. You can use d0e1d20557 and change order=1 to order=desc on index.js line 1842 to match the updates I made from review comments.

When #3964 is merged I'll open a new PR here to hook it up to the GUI

@aswild commented on GitHub (Jun 7, 2018): @hasufell The API enhancement in #3964 is done, just waiting for the Gitea team to merge it when they're ready. You can grab that for testing right now. Hooking the new API parameters to the GUI is easy, but there isn't a single commit you can cherry-pick right now. You can use https://github.com/aswild/gitea/commit/d0e1d205578ad01a09a955fcfb674a8b1175a91f and change `order=1` to `order=desc` on index.js line 1842 to match the updates I made from review comments. When #3964 is merged I'll open a new PR here to hook it up to the GUI
Author
Owner

@lafriks commented on GitHub (Feb 19, 2019):

Closing as fixed

@lafriks commented on GitHub (Feb 19, 2019): Closing as fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1784