Repository navigation
Add link to your fork under a repo's title - #1108
runofthemillgeek wants to merge 1 commit into
Conversation
|
Similar, but different use: https://github.com/musically-ut/lovely-forks |
|
This is an interesting feature, but I have one issue with it: this causes a fetch in every repo I visit, but I rarely have forks for repos I visit. This is also an issue because our API calls are currently key-less so they're heavily rate-limited. Is there a way to make this happen on demand? For example there could be an extended fork button that is directly linked to your profile:
Like this. Regular button is linked to your profile, the arrow opens the regular selector: |
I like this too, might just be able to force the current lightbox into a dropdown, leaving the fetching/populating to GitHub. I'm also not a fan of the current selector, it's annoying that a fork I already have is smaller than the others. It's like that it's not the right way to reach a fork and GitHub offers a better way... but doesn't? |
|
I like your alternative @bfred-it and it makes the current interface less frustrating. However, if I may, my original intention was to avoid placing the action of switching between forks on the fork button. This might be just me but I use the fork button to create new forks and not to switch. Moreover, if viewing my fork and click the fork button, it either:
I believe this makes it seem more like the Fork button is just for creating forks and hence not an trigger to switch between. GitHub places links to upstream right below our fork's title which might not be the most convenient thing but it's understood. That's why I thought a "forked from ..." might be more desirable than relying on the Fork button's dynamic behavior. I am inclined to another alternative which I just thought about. What about when you visit the upstream, the Fork button turns into this: This is more clear about what action the Fork button triggers and conveys that a Fork already exists. Like you suggested, the dropdown could also be present if more forks are available in the user's org. However, I hope you get my point about the confusing actions the Fork button can trigger and why I believe to isolate these. I still think it's clearer to place it below the title, maybe make it a little more visible than just a link and have a dropdown to switch between available forks. And maybe add a dropdown next to the Fork button too, but for creating new forks. |
|
@bfred-it I agree with the rate-limiting part. I'm also sorry I didn't open this as an issue and directly made a PR. I didn't think of it through and through and I only did a few research about the various ways of making this possible. Beside the request on every page, I don't think the way I implemented it works for all cases and needs an alternative approach to check if a fork exists. Maybe the details are present on the page itself. Also, since there are a lot of AJAX html being loaded and rendered, once the data about this is initially fetched, should cache it so there's no request going off while on the same repo. I would love to work on this if we can reach a consensus on how to go ahead with this and what the design should be like. |
This is one
This is nice, but it still requires a fetch, so we're back to square one. The suggestion of hiding it behind a button is specifically so the fetch happens only when the user clicks the button. |
|
@bfred-it I understand. Basically, you want to avoid any and all possible fetches when the page loads and defer that until the user shows the need for it. |
|
Moved comment to issue: #1129 (comment) |
|
Moved comment to issue: #1129 (comment) |
|
@sangeeth96 is this something you can pick up again following the new suggestions? |
|
@sangeeth96 Friendly ping :) |


Note by @bfred-it: I updated this comment to add screenshots and paragraphs.
Fixes: #1129
GitHub links upstream repo right below the title of our fork's title when we visit the fork's page. But it doesn't do the same thing on an upstream repo's page, i.e, link to the fork that we created.
IMHO, it is odd that you have to go to the top-right corner and click on the big "Fork" button to switch to your fork. The intention of that button is to create a fork. If I own multiple organizations, clicking on the fork button asks me whether I want to fork under an organization or switch to the fork under my account.
This is an added step to get to where we want and slows things down. I find it natural to expect the link to be below the title given that's how GitHub does it for a fork. This patch will add a link to our fork on upstream's page as soon as the dynamic pages are loaded.
I believe this can be extended in various ways (like a dropdown that shows forks under your orgs) but I want to know if the current implementation is fine and whether you guys think this is a good feature. The implementation currently has one main issue: