Skip to content

Tell me whether master is the latest published version - #2771

Merged
fregante merged 15 commits into
refined-github:masterfrom
bblommers:feature/2601
Feb 28, 2020
Merged

fregante merged 15 commits into
refined-github:masterfrom
bblommers:feature/2601

Conversation

@bblommers

@bblommers bblommers commented Feb 11, 2020 •

Copy link
Copy Markdown
Contributor

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

fregante commented Feb 11, 2020 •

Copy link
Copy Markdown
Member

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:

Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
@fregante

Copy link
Copy Markdown
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
Copy Markdown
Member

I think this feature is 🔥

@fregante

Copy link
Copy Markdown
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
Copy Markdown
Member

@bblommers

Copy link
Copy Markdown
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

fregante commented Feb 18, 2020 •

Copy link
Copy Markdown
Member

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. 😅

Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
Comment thread source/features/latest-tag-button.tsx Resolved
@bblommers

Copy link
Copy Markdown
Contributor Author

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

@fregante

Copy link
Copy Markdown
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
Copy Markdown
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

fregante commented Feb 28, 2020 •

Copy link
Copy Markdown
Member

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

yakov116 commented Mar 2, 2020

Copy link
Copy Markdown
Member

@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