New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable current release line when not yet cut #990
Conversation
scripts/helpers/latestversion.js
Outdated
@@ -9,9 +9,21 @@ const map = (release) => release && { | |||
openssl: release.openssl | |||
} | |||
|
|||
// might we undefined if the current release line has not been cut yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: we -> be
scripts/helpers/latestversion.js
Outdated
// has not yet been cut | ||
exports.upcomingCurrent = (releases) => { | ||
const isCurrentReleased = exports.current(releases) !== undefined | ||
const ltsMajor = semver.major(exports.lts(releases).node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to exit early when isCurrentReleased
is true
.
I like the idea, 👍. |
This LGTM #992 can be closed if this lands before the v7 release. |
scripts/helpers/latestversion.js
Outdated
@@ -9,9 +9,21 @@ const map = (release) => release && { | |||
openssl: release.openssl | |||
} | |||
|
|||
exports.lts = (releases) => { | |||
const match = releases.find((release) => release.lts && semver.lte(release.version, '5.0.0')) | |||
// might we undefined if the current release line has not been cut yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'might be' instead of 'might we'
@phillipj Would the "with upcoming current" grey text be disabled? I like that approach. |
Yepp, when grey it's just text, not an |
I think it could work. I have no better ideas (I'm also not a designer). |
what would be the behavior if someone visited the 'Current' url? |
@thealphanerd good catch, not particularly good I'm afraid :/ That page really doesn't handle current not being present -- see screenshot below. I've gotta sleep now. Feel free to suggest how the |
^^ seems like a showstopper for merging this today IMO. Especially since Thinking out loud, two options comes to mind for the
Afraid I won't be able to get any of the above options implemented before v7 is hopefully released today, meaning PR #992 is probably the one to be merged today. |
FWIW with how this past transition went I think it is pretty safe to say we'll probably do LTS a week before the next current again next year. |
@phillipj Hi, what's the current status of this PR? |
@fhemberger thanks, needed the reminder on this one 👍 So, this got stale cause I didn't have the time to do something with the What do you think? Would displaying a more or less blank page like that be sufficient in the short period where current does not exist? |
Maybe add some info about why there isn't a release line. Otherwise it looks like a "whoops, couldn't find that link" page (like we misplaced it 😁 ). Maybe something like:
Also if Otherwise seems reasonable to me. |
More info about why there is no Current release line and linking to the LTS download page, sounds like a good idea 👍 Little unsure about the wording you suggested:
I read that as the Current that existed, e.g. v5, would transition into LTS after a week or two, but in reality v5 had already moved into end of life IIRC. Maybe displaying the release plan graphics would be appropriate? Something like this: |
When Node 7 came out, Node 5 had already been EoL for several months right? The previous Current was Node 6, and the reason there was a gap is that Node 6 was transitioning from Current -> LTS. Agreed that the wording isn't exactly obvious for people who don't already understand the release process. |
Hm, you might be right, don't remember the exact details so I looked mostly at the screenshots I took initially when opening this PR: The most important thing is that the visitors actually understand what we're trying to communicate. Not being a native english speaker, I'm not confident I'll find something better than what already has been suggested though. |
@phillipj Hmm, it's been a while … what's the current status of this PR? What do we need to get it merged? |
I've got too much outside of GitHub these days, family and buying/building a house, so I don't have time to follow this up and push it through I'm afraid. If anyone sees value in this and want to get it merged, please go ahead and hijack the branch. Closing this for now. |
@phillipj Alright, take care! |
@fhemberger thanks, appreciated 👍 |
These changes makes the website handle periodes where a current release line has not been cut yet, automatically. As discussed in #982, we could grey out the "current" option, instead of two LTS options, in periodes where we don't have a current release line.
Rationale behind handling this automatically is to prevent us having to land a big PR, which we probably haven't tested much, asap after v7 has been cut. This would just work whenever v7 is out.
The main logic around this, is found in
scripts/helpers/latestversion.js
which picks which version should be displayed as LTS and current, plus "upcoming current" introduced with these changes. That logic is based around the list of releases in https://nodejs.org/download/release/index.json. In summary the logical rules are:.lts === true
.lts !== true
and version number greater than the latest LTSv6 + 1
Download page should probably have something similar implemented. Would appreciate any thoughts about how that might look. Tried simply greying out the background for "current" in the download matrix, but that really didn't look good, so I'm skipped that part for now.
Examples of how the frontpage looks depending on the versions found in https://nodejs.org/download/release/index.json.
Previously when LTS and current existed
#### When no current release is found (like now)
#### As soon as current exists again
## Tasks - [x] Frontpage - [x] Download page - [ ] Download page for current when current don't exist