Skip to content
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

feat: introduced changelog modal on downloads #6393

Merged
merged 14 commits into from
Mar 25, 2024
Merged

Conversation

ovflowd
Copy link
Member

@ovflowd ovflowd commented Mar 2, 2024

Description

This PR introduces the support of ChangelogModals within the Download's page of the redesigned Node.js Website

Note that this PR might increase the client bundle size 🤔 we should probably check how much of an increase it is.

Validation

The "changelog button" should open a changelog with the correctly rendered MDX data.

@ovflowd ovflowd requested a review from a team as a code owner March 2, 2024 15:02
Copy link

vercel bot commented Mar 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2024 7:20pm

@ovflowd ovflowd changed the title refactor: separate client and server/complex components feat: introduced changelog modal on downloads Mar 2, 2024
@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Mar 2, 2024
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Mar 2, 2024
Copy link
Contributor

github-actions bot commented Mar 2, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟠 78 🟢 90 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 91 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 90 🟢 100 🟢 92 🔗
/en/download 🟢 99 🟠 89 🟢 100 🟠 82 🔗
/en/blog 🟢 100 🟢 90 🟢 100 🟢 92 🔗

@ovflowd
Copy link
Member Author

ovflowd commented Mar 2, 2024

Note that this version of the ChangelogModal does not include the avatars of all contributors that made a release happen. We still need to hook this into some internal utility for getting the names of all release authors.

I remember @richardlau or @targos mentioning this, but I might be remembering this incorrectly 🤔

Copy link
Contributor

github-actions bot commented Mar 2, 2024

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 84%
79.29% (452/570) 76.19% (144/189) 69.91% (79/113)

Unit Test Report

Tests Skipped Failures Errors Time
90 0 💤 0 ❌ 0 🔥 4.652s ⏱️

@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Mar 2, 2024
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Mar 2, 2024
Copy link
Member

@mikeesto mikeesto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On mobile there's a "X" in the top right to close the modal. I think it would be good to keep it for wider viewports too?

@canerakdas

This comment was marked as resolved.

@ovflowd
Copy link
Member Author

ovflowd commented Mar 4, 2024

I compared the page source sizes for the two versions:

With changelog modal; Source size: 193.85 KB

Beta without changelog modal; Source size: 86.65 KB

In addition, when I check with @next/bundle-analyzer, the gzipped dimensions are as follows;

Server feat/changelog-modal;

image Server `main`; image Due to the nature of our page structure, it is not clear exactly what these parts affect. There seems to be an increase only on `../app/[locale]/[[...path]]/page.js`.

Client feat/changelog-modal;

image Client `main`; image I'm not sure exactly how we can reduce the size here, but I'll check it out as well (if it's possible) 👀

If you can investigate that'd be great! It is indeed a big bundle increase, mostly (I assume) because it is also bundling the Shiki WASM and Languages and Theme on the client-side 🤔

Can you check what's the bundle difference if we removed Shiki from the ChangelogModal?

Co-authored-by: Michael Esteban <[email protected]>
Signed-off-by: Claudio W <[email protected]>
@targos
Copy link
Member

targos commented Mar 5, 2024

Something feels weird with how the page seems to disappear entirely with no UI element to close the modal.

@ovflowd
Copy link
Member Author

ovflowd commented Mar 17, 2024

@canerakdas I believe we need to reduce blur and add a close button. Also the changelog should only open after finishing fetching the data (IMO)

@canerakdas
Copy link
Member

canerakdas commented Mar 18, 2024

I think it looks better/accessible now, you can check it in the Vercel preview 👀 cc @ovflowd

Before:
image

After:
image

Before/Dark:
image

After/Dark:
image

@ovflowd
Copy link
Member Author

ovflowd commented Mar 18, 2024

Awesome! Would it also bee too much to ask you to check into what Richard mentioned (changelog-maker pulls the information out of the git commits.) for getting the full list of GitHub usernames for the "AvatarGroup" on the modal?

@ovflowd
Copy link
Member Author

ovflowd commented Mar 24, 2024

I believe we can merge this as it is; But we need reviews cc @bmuenzenmeyer @nodejs/nodejs-website

Copy link
Collaborator

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small accessibility bug to fix

node-focus-bug.mov

@canerakdas
Copy link
Member

Ah, I completely missed this, I solved it by wrapping it with a button. If we think we may encounter such situations more often, it seems like we can use Radix primitive slot

Copy link
Collaborator

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤝

@bmuenzenmeyer bmuenzenmeyer added this pull request to the merge queue Mar 25, 2024
Merged via the queue into main with commit 13d4cf2 Mar 25, 2024
15 checks passed
@bmuenzenmeyer bmuenzenmeyer deleted the feat/changelog-modal branch March 25, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants