-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal / Feature Request: Pin Repositories #10375
Comments
This would be really nice! |
This would also be very useful for individual user profiles, in addition to organizations. |
I stumbled upon this with individual user profile as I have "real" repositories and then now I have a tutorial repository for learning. The result is that whenever I push to the tutorial repository it gets pushed to top and takes visibility from the real repositories that I would actually like to show. |
Yeah, that would definitely be awesome ! |
I may work on this feature if no one started yet, at least on the backend. Regarding the backend, independent of the option we go with, I imagine we will have to:
*not sure what this would mean, but I imagine different gitea owners may want different configurations for this, right? Regarding the API, should we create a new API to pin? Or should we use the editRepo? Should users be able to pin while creating a new repo? |
I think I'd like to tackle this issue. Does it satisfy the requirement if pinned repositories are simply listed first on a user/org page? Do we actually need a limit on how many repositories can be pinned? If it's just a sorting feature, then it can be up to orgs/users to determine what suits them. For the API, are we happy to just extend Is it preferable to have |
Maybe max limit is 6 and 3 for one line. |
Is this presuming that we use the "3 tiles" format, suggestion no.1? I was going to go with no.3 for ease of implementation. |
This is the latest draft if I'm not mistaken, right? So wouldn't it based on that make sense to make Since it'd now be possible to pin repos, users could present their work centered and up front anyway, so the next most interesting info is probably what they've been recently up to and not the entire exhaustive list of random smaller other repos (when you've already seen their standout projects pinned!). It might make Gitea feel more social and alive, seeing more prominently the concrete activity and comments. |
Originally posted by @delvh in #19831 (comment)
Originally posted by @Eekle in #19831 (comment)
Originally posted by @ell1e in #19831 (comment) I'm moving the discussion now here as it is more appropriate here. So, at the moment, we have the following options:
|
Repeating my concern from #19831 (comment) I think the UI could really get in the way of function here. Pinning a repository to its owner's profile is going to be the most common use case, probably overwhelmingly common in the case of orgs. If we allow arbitrary pinning to org+user profiles, I think it could easily muddy the experience of the common case. Perhaps if the main pin button were for "pin/unpin from owner", but we include a dropdown for more intricate options (pin/unpin from active user, or from other administrated orgs), then that might be nice. |
Yes, that was also what I meant. Also, when we implement 1 or 2, we always have to filter all pinned repos for whether the current viewer can see the corresponding repos as we can otherwise have security issues where unallowed users can see that a specific repo exists. |
I suppose we have to check visibility no matter what, though? For things like private repos? |
Makes sense. As I mentioned, the approach of storing a JSON list is in that case probably not a good idea anymore. |
No I agree with you. It feels like a |
Well, probably rather a |
Smart. One thing to consider is that you might lose visibility of a repo you've pinned. For example if it gets made private, or you lose access to an org. In those cases, I guess we can just leave the entries in the |
Shouldn't a pin depend on 100% unrestricted public visibility anyway? If I have access to an org but nobody looking at my profile does, I'm not sure it should be allowed that I pin anything from that org. After all others can't then go and look at it, that would be confusing. |
It would be intuitive to me if you could pin whatever, but other users wouldn't see it on your profile unless they had visibility of it too. |
Yep, that's also the approach I had in mind. |
Right, I guess that has some use especially in corporate instances where the majority might be private but still be visible to a lot of people and hence worth pinning. I can however see it leading to some confusing on mostly public instances when users pin something there that they thought was (and is) private, then wondering why that even worked and maybe not realizing it's not really shown on their profile anyway. |
What is GitHubs approach here? Do they allow pinning private repos? |
Also, pinning private repos even makes sense: |
The current implementation marks a repo as This is the same marking used on the actual repository listing on the profile. So I hope that is enough of a cue to a confused user that "Oh this is listed as private, so they've taken it into account." |
I suspect given the scope of changes suggested relative to the first implementation, it's going to have to be pretty much all torn out. The only reusable work is likely to be the pin card implementations on profile pages. |
Omg yes, that looks perfect! I love that. This is going to be pretty cool if it all works out as planned. |
Hey guys, is their any update on this? |
What's the status of this issue? |
Haven't got any response yet, but I am still looking for a workaround. I have a few projects that I would like to highlight in my developer portfolio web-app. Now, this would take advantage of the Gitea/Codeberg API, where I'll be able to choose projects that will be shown on my website. In GitHub, you can do this conveniently by pinning and using that specific API to highlight pinned projects, but I'm not sure if there's any similar mechanisms for Gitea/Codeberg? |
@Ashvith10 there actually is kind of a workaround now! You can do both profile readmes and org readmes in the latest gitea version, which looks like this in practice: (me on codeberg with profile readme). and you can just put projects there! (the org readme update might not have reached codeberg yet, but it should soon.) as for using that from your website, maybe you could use some hidden HTML comment in your profile readme or such that allows to extract things in a more automated fashion, and parse that when fetching your profile from your website script. |
Since v1.20.1, actually. |
Not the org readmes. anyway, it should reach codeberg soon. in my personal opinion these readmes are so good, that it even replaces pinning in some sense. like, i personally don't think pins add much with this feature now present, but that's just my opinion of course. |
@ell1e unfortunately, that isn't what I'm looking for, I was talking about the Codeberg REST API, actually. So, if there was a way to pin projects, I could access that particular API from the web app that I'm hosting on a cloud platform. So far, I've come across this: curl -s https://codeberg.org/api/v1/user/starred -H "Authorization: token <hidden-for-security-reasons>" But this also includes other starred users, which means pointless overheads. |
you can put stuff into the HTML comments into a markdown file like the profile readme, and i think they render into the final output, usually. so it's possible to hide machine readable data in there. |
Me and @DanielMatiasCarvalho are working on this. |
Hi team,
first let me say: It's awesome what you are doing here!
I wanted to propose a feature, currently existing in many other SCM UIs. Having the option to pi a specific amount of repositories to the top would be awesome.
Description
Pinning a repository to the top of an organization can be helpful for many use cases.
Mockup / Ideas
I am seeing three possible options here to have a pinned repository:
1. Pinned Cards
This option will lead the viewers attention directly to the featured / pinned / important repositories.
2. Featured Repository
This option will take use of the unused space on the right side the same way as people and teams are featured.
3. Pinned List
The last option may be the simplest way. Pinning a repository just means, that it will stay on top of the repository list.
The text was updated successfully, but these errors were encountered: