Repository navigation
Conversation
|
cc @mbtools I'm not totally convinced that this link is worth the extra ~10px of width of the header, I'll keep an eye out on #9433 this week and will revert this PR if I see additional issues. As for the "link to own fork", I guess that's not happening as it would be ~45px extra pixels in your mockup. |
|
Guess I'm lucky to have a wide screen but I can see how space becomes an issue. Lgtm 🙏 |
|
Until we had that issue, we had no problem adding and removing items from the screen, even if they were to be hidden on small screens. The problem is mostly due to GitHub's code being self-contained and unaware of our elements, so any addition inevitably causes issues and this depends on the user/repo length as well. |
| } | ||
|
|
||
| // GitHub may already show this icon natively, so we match its position | ||
| if (forked) { |
There was a problem hiding this comment.
Moved because we have two link.after() calls; order matters
| repoLink.append( | ||
| appendBefore( | ||
| repoLink, | ||
| '.octicon-repo-forked', |
There was a problem hiding this comment.
Shuffle them to keep the fork on the right side
| // GitHub may already show this icon natively, so we match its position | ||
| if (isFork && !elementExists('.octicon-repo-forked', repoLink)) { |
There was a problem hiding this comment.
We added this code two years ago, I can't find a repo without a fork icon. The private icon on the other hand is missing from "private forks", most likely because in their opinion it should show "max 1 icon"
🥲 |
Test URLs
Wide screen, clickable
Tight screen, native