"My repositories" sorting#1266
Labels
No labels
⌚ Major-release
⌚ Minor-release
⚔️ Wontfix
⚙️ CI
⛏️ Breaking
✅ Fixed
✨ Duplicate
❌ Invalid
❓ Question
❤️ Support
➡️ Frontport
➡️ Needs-frontport
🌐 Translation
🌠 Long-term
🎉 Feature
🎯 Enhancement
🏗️ Build
🐛 Bug
👋 Good-first-issue
💀 Deprecation
💡 Suggestion
💬 Discussion
💭 Brainstorming
💰 Sponsored
💻 UI/UX
📄 Documentation
📈 Performance
📌 Priority-critical
📌 Priority-high
📍 Priority-low
📍 Priority-medium
📡 Needs-feedback
📱 F-droid
📸 Release
🔒 Security
🔙 Backport
🔙 Has-backport
🔙 Needs-backport
🔙 Regression
🔭 Cannot-reproduce
🗄️ Repository
🗒️ Changelog
🗓️ Summary
🤾 Google-play
🥑 Ready
🧪 Testing
🧺 Cleanup
🧺 Needs-cleanup
🧾 Confirmed
🩹 External-dependecy
🪒 Refactor
🪜 Upstream
🙇♂️ Needs-help
🚀 Improvement
🚨 Investigate
🛡️ Blocked
🛰️ API-dependency
🟦 Website
No project
No assignees
6 participants Notifications
Due date No due date set.
Dependencies
No dependencies set.
Reference
gitnex/GitNex#1266
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
# Describe your matter briefly
Items in "My Repositories" are weirdly sorted, so I'd like to suggest sorting these by update date or name by default and allow the user change it as a setting.
Thanks
This should be an upstream, because I don't see any parameter to sort the repositories. Currently the API provide results and GitNex just render it as is.
API: https://codeberg.org/api/swagger#/user/userCurrentListRepos
How about getting the full list and sorting locally ?
This is incompatible with pagination (and we won't fetch the full list and break pagination).
how is it incompat with pagination in this case? my own "My repositories" list has no pagination, its just a long list.
From issue #1274:
Web interface directly work with the database calls, while GitNex rely on API calls, it has no direct access to database like web interface.
By default, each implemented API call has pagination (where needed). What it means is that the local sort becomes useless when pagination is called for next set of data.
Beside that, adding sort to the API call is the way forward and easier to follow.
GET /repos/{owner}/{repo}/issues- sort parameter? #4173related: forgejo/forgejo#4173
Thank you @martianh for reporting it upstream.
No problems! I actually started hacking on a small emacs client for forgejo recently, and was confused by the sorting of results. i'm used to APIs that have server-side sorting.
but I wonder, there must be another way to do it, as the web UI allows for a full range of sorting options, which don't break pagination. it may just be a case of lacking client app documentation. (i also don't know how to discover maximum values for "limit" params or similar, do you?)
i think forgejo peeps are very busy, so not sure if they'll respond as they marked it as a not important issue.
I think your question was already answered here.
FYI, i encountered a friendly forgejo dev on fedi, and asked about sort params for issues.
they kindly agreed to take a look, and hey presto: forgejo/forgejo#7211.
(nb: API sort params for issues, not repos, but still good news.)
the above PR has been approved. maybe gitnex could also request API sorting for repo listings too? if you follow the issue template (unlike me) and say you're from gitnex, you'll likely get a response.
Thanks for the update.
I normally do, but I have to also manage my time with other things and don't have much time to check other projects.
Last time some of the GitNex maintainers worked on Gitea also, so it was fast to implement a feature or fix. Now is a bit different because they left GitNex and also the split of Gitea and Forgejo.
But you still can open issues there and tag me if you feel to. At least this we can remind them that the issue is there and open.
@mmarif wrote in #1266 (comment):
No need to, forgejo/forgejo#7256
Thank you @Gusted , that was super fast.
Not related, but I thought if someone want to work on this one, its there for sometime and only affect Codeberg and MySQL related instances I think.
forgejo/forgejo#1998
@mmarif wrote in #1266 (comment):
How does gitnex use this?
I'm kinda scared to fix this query as returning all issues accessible to the user seems a bit too much to be returning over the internetah its limited, does Gitnex require all the issues to be returned?just an update, this is in main Foregejo now, v 11 is released and running. So GitNex could implement a fix for this now.
@martianh Thanks.
I think there’s been a slight miscommunication here.
There are two endpoints:
/api/v1/user/repos– Sorting has already been added to this one. It’s a generic API that lists all repositories a user has access to. In the app, this corresponds to the "Repositories" section./api/v1/user/{username}/repos– This is the endpoint referenced in this issue. It represents the "My Repositories" section in the app and only includes repositories created under the user's own username.The point is that sorting has currently been added to an endpoint that powers a different screen in the app. While that's still useful, I suggest we also add sorting to the
/api/v1/user/{username}/reposendpoint.Apologies for the confusion earlier—my previous message referenced the wrong endpoint. That was an oversight on my part.
#1266 (comment)
The implementation is already in place, and I hope it can be easily added to the other endpoint in a point release for v11, if the Forgejo team is open to it.
cc @Gusted.
thanks for clarifying. for basic usage j dont much mind which one i use. currently my Repositories view is sorted alphabetically (server default), but it has no UI to choose sorting. i would expect a default like last updated and a way for the user to select sorting. is that possible? (i think im on latest release also)
Sorting is just added to that endpoint. GitNex does not have this option yet. Hopefully the next release can have it for Repositories and My Repositories (if it was implemented before the release).