Skip to content

misc: show only latest archive alpha/beta versions dropdown #5862

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

Merged
merged 2 commits into from
Nov 3, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Nov 3, 2021

Motivation

Currently versions dropdown on the site is quite long, I propose to reduce its items by showing only the latest archived versions, since all available versions already renders on the "Versions" page.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Nov 3, 2021
@lex111 lex111 requested a review from slorber as a code owner November 3, 2021 10:32
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 3, 2021
@netlify
Copy link

netlify bot commented Nov 3, 2021

✔️ [V2]

🔨 Explore the source changes: 5a3a3e8

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/6182afb80f12dd000738ec3e

😎 Browse the preview: https://deploy-preview-5862--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Nov 3, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 88
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5862--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Nov 3, 2021

Size Change: -19.3 kB (-2%)

Total Size: 832 kB

Filename Size Change
website/build/assets/js/main.********.js 425 kB -654 B (0%)
website/build/blog/2017/12/14/introducing-docusaurus/index.html 66.1 kB -2.66 kB (-4%)
website/build/blog/index.html 36.8 kB -2.66 kB (-7%)
website/build/docs/index.html 44 kB -2.66 kB (-6%)
website/build/docs/installation/index.html 51.5 kB -2.66 kB (-5%)
website/build/index.html 29.5 kB -2.66 kB (-8%)
website/build/tests/docs/index.html 25.2 kB -2.66 kB (-10%) 👏
website/build/tests/docs/standalone/index.html 21.7 kB -2.66 kB (-11%) 👏
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 38 kB
website/build/assets/css/styles.********.css 94 kB

compressed-size-action

@Josh-Cena
Copy link
Collaborator

Josh-Cena commented Nov 3, 2021

What's the rationale to keep the last Alpha release? The alpha-beta cutoff was pretty arbitrary iirc, and beta.0 is not much different from alpha.75. From the NPM stats it doesn't seem alpha versions are very popular either

Also, surprised to see such significant bundle size optimization👀

@slorber
Copy link
Collaborator

slorber commented Nov 3, 2021

Agree that it's not so useful to keep the latest alphas.
I'd rather keep the last 5 archived versions in the dropdown + 1.x.
Other versions remain available on the "All Versions" page anyway.
It's probably worth creating a const ArchivedVersionsDropdownItems

Also, surprised to see such significant bundle size optimization👀

I don't understand either, would be interesting to investigate and see a diff

@lex111
Copy link
Contributor Author

lex111 commented Nov 3, 2021

I'd rather keep the last 5 archived versions in the dropdown + 1.x.

There won't be any alpha version in dropdown, alright then, but maybe we shouldn't create extra var for this?

@slorber
Copy link
Collaborator

slorber commented Nov 3, 2021

Looks good enough for now thanks 👍

@slorber slorber merged commit 9f13f8f into main Nov 3, 2021
@slorber slorber deleted the lex111/simplify-versions-dropdown branch November 3, 2021 16:41
@slorber
Copy link
Collaborator

slorber commented Nov 3, 2021

FYI about the file size diff: #5865

@Josh-Cena Josh-Cena added pr: documentation This PR works on the website or other text documents in the repo. and removed pr: maintenance This PR does not produce any behavior differences to end users when upgrading. labels Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: documentation This PR works on the website or other text documents in the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants