Do you want to work on this issue?
You can request for a bounty in order to promote it!
Add timemachine links to all repo links #1863
bfred-it posted onGitHub
I think that the most clear and less troublesome way to solve this is to add an icon:
- It avoids the "What you see is not what I get issue that'd we'd have if we change links without leaving a visual cue.
- It clearly shows that a link can be refined, rather than hiding the action behind a button (which I wouldn't know where to place anyway)
<img width="425" alt="a" src="https://user-images.githubusercontent.com/1402241/54550604-42e3a900-49e7-11e9-91c8-84adf532ead7.png">
<img width="516" alt="b" src="https://user-images.githubusercontent.com/1402241/54550606-437c3f80-49e7-11e9-8ffc-37e35b03bfe1.png">
Notes
- It's applied to all non-commit links (
blob
ortree
) - All links point to the default branch instead of the linked branch because
- timestamped git tag links don't work (e.g. https://github.com/bfred-it/select-dom/tree/v4.0.0@%7B2019-03-17T08:48:45Z%7D)
- we don't know if a
ref
is a tag without fetching it first
Tests
- https://github.com/sindresorhus/refined-github (repo link not altered)
- https://github.com/sindresorhus/refined-github/blob/master/source/libs/api.js#L3
And more links in:
- https://github.com/sindresorhus/refined-github/issues/807#issuecomment-469245606
- https://github.com/sindresorhus/refined-github/issues/1792
- https://github.com/sindresorhus/refined-github/issues/1096
- https://github.com/sindresorhus/refined-github/issues/1676#issuecomment-449004524 (these links are not affected because they are
/compare/
and/commits/
) - https://github.com/sindresorhus/refined-github/issues/1735
- https://github.com/sindresorhus/refined-github/issues/1197
- https://github.com/sindresorhus/refined-github/issues/1464 (perfect example because the linked file is now missing)
Possible bug, should we disable this feature in code blocks?
The clipping bug is actually due to the #1146 and also appears for linkified issues: no full solution, but moving the tooltip to the right might solve it for short links
Suggest more conversations with links like that
Closes https://github.com/sindresorhus/refined-github/issues/1448