Refined-github: Show status of linked-to PR/Issue

Created on 6 May 2016  路  8Comments  路  Source: sindresorhus/refined-github

If there is a link to another issue/PR, I should somehow be able to identify it's status (green/red/purple color coding, or inline a badge).

enhancement help wanted

Most helpful comment

Here you go! I implemented this as a separate extension since it's _marketable on its own_ and can be useful even if people aren't interested in Refined GitHub.

https://github.com/bfred-it/github-issue-link-status

https://chrome.google.com/webstore/detail/github-issue-link-status/nbiddhncecgemgccalnoanpnenalmkic

All 8 comments

馃憤 That would indeed be useful.

@jamestalmage I've discovered (but not tried or inspected source so cannot yet recommend) https://justineo.github.io/github-hovercard/.

Duplicate issue with some useful discussion: #373

I'd love to see this. Relevant comments from that repo:

Would be useful indeed, but we would have to use the GitHub API for this, which has limits on how many requests we can do, so it gets complicated fast. We would also need to have an options page for the user to save their token. We could fetch the whole page instead and have no limits, but that's wasteful.

Regarding the actual UI, I'd go with an icon of open/closed issue/PR. This way you'll also know what's this number is referring to.

What's the preferred course of action? I think we should start using the API without a token and add a token field in the options to enable private repos support and increase the limits.

This would be nice:
with icon

or even
with icon and color

There's one issue with the icons though: change of layout. We already change links on load in #473 and that causes text to move around, but it happens once, right after the page load. This would happen many times as the fetches finish loading and it could get annoying fast.

Either we skip the icon (and keep the color) or we replace the # with it, making sure it's the same exact width.

Edit: but the latter can't be done for external issues like user/repo#111 because # is in the middle.

Maybe the jump is not _that_ annoying. Or maybe PR can be added in minuscule font above # instead, absolutely positioned.

We could add a padding via CSS and make the icon absolutely positioned

Hey, that's an easy way out. 馃憤 It'll also need a temporary icon then otherwise the extra padding will look bad until the icons are in.

Here you go! I implemented this as a separate extension since it's _marketable on its own_ and can be useful even if people aren't interested in Refined GitHub.

https://github.com/bfred-it/github-issue-link-status

https://chrome.google.com/webstore/detail/github-issue-link-status/nbiddhncecgemgccalnoanpnenalmkic

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Celthi picture Celthi  路  3Comments

sindresorhus picture sindresorhus  路  3Comments

Arcanemagus picture Arcanemagus  路  3Comments

pawelad picture pawelad  路  3Comments

hkdobrev picture hkdobrev  路  3Comments