Skip to content

Add link to forked repo below the original - #2105

Closed
jerone wants to merge 1 commit into
refined-github:masterfrom
jerone:features/jvw-#1129-forked-to
Closed

jerone wants to merge 1 commit into
refined-github:masterfrom
jerone:features/jvw-#1129-forked-to

Conversation

@jerone

@jerone jerone commented May 30, 2019 •

Copy link
Copy Markdown
Contributor

Description

Add links to the forked repos below the original repo. For users and organizations.

Closes

Closes #1129
Supersedes #1108

Screenshots

Original repo:
image

User forked repo:
image

Organization forked repo:
image

Hover card:
image

Test

  1. Open any repo and click on the Fork button.
  2. Fork the repo.
  3. Go back to the original repo.
  4. Below the repo name, a link to your fork will presented.


const forkFragment = select<HTMLElement>('include-fragment', forkDialog)!;
forkFragment.addEventListener('load', () => onFragmentLoaded(forkDialog));
forkFragment.setAttribute('src', forkFragmentUrl); // This will load the fork fragment.

@fregante fregante May 31, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the suggested solution, I don’t want to load the fork fragment on every page of every repo I visit.

Please refer to the instructions in the last comment of that issue. #1129 (comment)

The fork should only be remembered once you visit it. If you never visit your fork, there will be no link.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fork fragment already starts loading once you hover over the fork button, therefor I thought GitHub wouldn't mind this one extra call to the fragment. It's not an API call. And it's done async.

@fregante fregante May 31, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but I don’t hover the fork button and the suggested solution works best for repos that you didn’t fork: which is the vast majority of them.

Async or not, there’s a repeated HTTP request we can avoid, for something that most of the times doesn’t exist.

@fregante fregante changed the title Add link to forked repo below the original. Closes #1129 Add link to forked repo below the original May 31, 2019
@jerone jerone closed this May 31, 2019
@jerone
jerone deleted the features/jvw-#1129-forked-to branch July 3, 2019 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add link to forked repo below the original

2 participants