Skip to content

Conversation

@bblommers
Copy link
Contributor

@bblommers bblommers commented Feb 11, 2020

Fixes #2601

If understood correctly, there are three use cases here:

  1. The user is viewing an old release
  2. The user is viewing the latest release
  3. The user is viewing the latest release, and master has new commits post-release

Test

  1. https://github.com/spulec/uncurl
  2. https://github.com/spulec/uncurl/tree/0.0.10
  3. https://github.com/spulec/moto
  4. https://github.com/spulec/moto/tree/1.3.14

The last test case now has a new icon:

bleeding_edge


IssueHunt Summary

IssueHunt has been backed by the following sponsors. Become a sponsor

@fregante
Copy link
Member

fregante commented Feb 11, 2020

Thank you for this! Just a note: by "bleeding edge" I meant "on master but not tagged", so a tag cannot be marked as "bleeding edge". In your screenshot, it should look like it looked before:

@fregante
Copy link
Member

There are now 4 states:

Latest tag

tag

Default branch, tagged

default tagged

Default branch, not tagged

default branch not tagged

Other branches or other tags

other branch

@fregante
Copy link
Member

I think this feature is 🔥

@fregante
Copy link
Member

Possible improvements:

  • smaller icon
  • lower opacity
  • different icon

While I think this piece of information is important, maybe it shouldn't look like such a big problem.

The "info" icon doesn't seem right either

Other options: https://octicons.github.com/

@yakov116
Copy link
Member

https://octicons.github.com/icon/dashboard/ ? It looks like a speedometer to me 😀

@bblommers
Copy link
Contributor Author

Completely agree on the icon @fregante - it does make it look like there's a problem. The info-icon is better, IMO, as it simply denotes an informatory message.

Is the eye-icon an alternative? Basically saying "Hey, have a look here, there's something you might want to pay attention to"
https://octicons.github.com/icon/eye/

@fregante
Copy link
Member

fregante commented Feb 18, 2020

Is the eye-icon an alternative? Basically saying "Hey, have a look here, there's something you might want to pay attention to"

That icon means visible (or hidden). You're describing the Info icon, but I think this information is slightly more "urgent" that that. It sits somewhere between Info and Warning

If we had a behind_by count we could add a small +2 in the tag button and avoid the icon altogether.

Or maybe this indicator should be in the branch selector instead. 😅

@bblommers
Copy link
Contributor Author

Anything I can do to help move this along @fregante @sindresorhus?

@fregante
Copy link
Member

Updating screenshots:

Latest tag

tag

Default branch, tagged

default tagged

Default branch, not tagged

default branch not tagged

Other branches or other tags

other branch

@fregante
Copy link
Member

Looks great!

@fregante fregante merged commit 54a098e into refined-github:master Feb 28, 2020
fregante added a commit that referenced this pull request Feb 28, 2020
@fregante
Copy link
Member

fregante commented Feb 28, 2020

Strangely the second call is failing on https://github.com/fregante/webext-storage-cache

 TypeError: "Object(...)(...) is null"
    getAheadByCount moz-extension://b3d02b04-e4fa-0c45-9406-305c7b1b784a/content.js:5820

It's the select_dom line

  const getAheadByCount = webext_storage_cache["a"].function(async latestTag => {
    const tagPage = await fetch_dom(`/${Object(utils["j"])()}/releases/tag/${latestTag}`);
    return Object(select_dom["a"])('.release-header relative-time + a[href*="/compare/"]', tagPage).textContent.replace(/\D/g, "");
  }, {
    expiration: 1,
    cacheKey: () => "latest-tag-button" + ":aheadBy:" + Object(utils["j"])()
  });

fregante added a commit that referenced this pull request Feb 28, 2020
@fregante fregante mentioned this pull request Feb 28, 2020
@yakov116
Copy link
Member

yakov116 commented Mar 2, 2020

@bblommers thanks this feature is awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Tell me whether master is the latest published version

4 participants