Repository navigation
Restore forked-to feature and enable it for every user - #5597
Conversation
cheap-glitch
left a comment
There was a problem hiding this comment.
@refined-github/maintainers Could someone who's in several organizations test this with multiple forks? Thanks 💟
| const hasOrganizations = await elementReady('details-dialog[src*="/fork"]', {waitForChildren: false}); | ||
| const hasOrganizations = select.exists('[data-ga-click*="show fork modal"]'); |
There was a problem hiding this comment.
This targets an attribute on the "Fork" button itself, so we shouldn't need the elementReady. Not sure if this is really limited to people in organizations though.
|
GitHub really broke the flow here and I expect them to change this once again soon. The fork button now always points to the new Big deal breaker: there is NO link to my existing fork. At least I don't see it.
|
|
Separately perhaps I'd also replace the |
forked-to featureforked-to feature and enable it for every user
|
I suppose this will also close #5435 |
I don't know, I've never seen this error in the first place |
fregante
left a comment
There was a problem hiding this comment.
Feel free to merge and release a new version today
| // Only fetch/update forks when we see a fork (on the current page or in the cache). | ||
| // This avoids having to `updateCache` for every single repo you visit. | ||
| if (forks || (hasOrganizations && pageDetect.isForkedRepo())) { | ||
| if (forks || pageDetect.isForkedRepo()) { |
There was a problem hiding this comment.
Can you flip this condition to allow an early return? I think
| if (forks || pageDetect.isForkedRepo()) { | |
| if (!forks && !pageDetect.isForkedRepo()) { | |
| return false; | |
| } |
There was a problem hiding this comment.
Thought about it too but in this case, since the first block is only one line long, I think it just makes the logic less clear while providing no benefits at runtime.
The repository fork button now displays existing forks. AND THEY MENTIONED REFINED GITHUB Is this @fregante's work? Impressive 🎉 |


Fixes #5596
Test URLs
Fork a repo 🍴
Screenshot