Skip to content

Conversation

@efekrskl
Copy link
Contributor

Description

Adds a toggle to the EOL table that filters non LTS releases

Validation

Content being filtered:
image

Other:
image
image
image

Related Issues

Closes #8017

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@efekrskl efekrskl requested a review from a team as a code owner October 23, 2025 14:52
Copilot AI review requested due to automatic review settings October 23, 2025 14:52
@efekrskl efekrskl requested a review from a team as a code owner October 23, 2025 14:52
@vercel
Copy link

vercel bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nodejs-org Ready Ready Preview Nov 19, 2025 7:47pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a toggle switch to filter non-LTS releases from the EOL (End of Life) table. Users can now hide non-LTS versions to focus on LTS releases only.

Key Changes:

  • Introduced a new Switch UI component with Radix UI integration
  • Refactored EOL table to support client-side filtering with state management
  • Fixed the isLts determination logic to use ltsStart instead of status string matching

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/ui-components/src/Common/Switch/index.tsx New Switch component implementation using Radix UI primitives
packages/ui-components/src/Common/Switch/index.stories.tsx Storybook stories for the Switch component
packages/ui-components/src/Common/Switch/index.module.css Styling for the Switch component with light/dark mode support
packages/ui-components/package.json Added @radix-ui/react-switch dependency
packages/i18n/src/locales/en.json Added translation key for "Hide non-LTS versions" label
apps/site/next-data/generators/releaseData.mjs Fixed isLts logic to check for ltsStart existence
apps/site/components/EOL/EOLReleaseTable/index.tsx Refactored to use new client component
apps/site/components/EOL/EOLReleaseTable/TableClient.tsx New client component with filtering state and Switch integration
apps/site/components/EOL/EOLReleaseTable/TableBody.tsx Removed file - functionality merged into TableClient
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

Wow! Thanks for this!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@efekrskl
Copy link
Contributor Author

Wow! Thanks for this!

Thanks for the quick review!

Copy link
Member

@flakey5 flakey5 left a comment

Choose a reason for hiding this comment

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

lgtm for web infra bits, thank you!

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGMT !

Copy link
Contributor

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

love it - my only nit, as a fast follower or even as a never - is that it'd be nice if these occupied the same vertical spacing. that greatly complicates the MDX / header / component relationship though, so no worries

Image

@codecov
Copy link

codecov bot commented Oct 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.26%. Comparing base (8a30f18) to head (52423d8).
⚠️ Report is 25 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8263      +/-   ##
==========================================
- Coverage   76.72%   76.26%   -0.46%     
==========================================
  Files         118      118              
  Lines        9805     9903      +98     
  Branches      335      336       +1     
==========================================
+ Hits         7523     7553      +30     
- Misses       2280     2348      +68     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmuenzenmeyer

This comment was marked as outdated.

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

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

LGTM, it looks cool to be able to do that

@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 97 🟠 88 🟢 100 🟢 100 🔗
/en/about 🟢 100 🟢 93 🟢 100 🟠 88 🔗
/en/about/previous-releases 🟢 97 🟢 93 🟢 100 🟢 100 🔗
/en/download 🟢 98 🟢 96 🟢 100 🟢 100 🔗
/en/download/archive/current 🟢 100 🟢 100 🟢 100 🟢 100 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 100 🔗

@avivkeller
Copy link
Member

@ovflowd can you re review

Copy link
Member

Choose a reason for hiding this comment

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

This is a very unusual component name. Why TableClient? Because it is a client Component? Unfortunately that's an awful name 😅

Copy link
Contributor Author

@efekrskl efekrskl Nov 19, 2025

Choose a reason for hiding this comment

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

Yep, that was my reasoning. Seeing that I got multiple comments on it, it was a bad call 😅 I will rename it after we agree on the other changes about the table

This is now reverted

checked={hideNonLts}
onCheckedChange={setHideNonLts}
/>
<table id="tbVulnerabilities">
Copy link
Member

Choose a reason for hiding this comment

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

Why did you move this here and rename the file? Could you please revert this change? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted


return (
<>
<Switch
Copy link
Member

Choose a reason for hiding this comment

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

My gut feeling tells me you can do a pure HTML switch with CSS and have the table being hidden purely with CSS.

Can you please do that? On this website we want to avoid feature-gating behind JavaScript.

versionWithPrefix: `v${latestVersion.semver.raw}`,
codename: major.support.codename || '',
isLts: status.endsWith('LTS'),
isLts: support.ltsStart !== undefined,
Copy link
Member

Choose a reason for hiding this comment

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

This has unwanted side-effects. This flag isn't used to say if a version is a LTS version-line or not, but if it is currently LTS. Please revert this change and use the codename as a field to verify a release line is a LTS release line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, reverted this back + using codename for checking for LTS releases now

@@ -0,0 +1,49 @@
'use client';
Copy link
Member

Choose a reason for hiding this comment

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

As much as I love Radix! I feel we should make the switch purely with CSS and HTML and have the table entries be affected based on that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair, I changed the implementation to use html/css only. However, the only way I could get it to work was through using has, which is newly available (https://caniuse.com/css-has). Does this work?

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

Appreciate your contribution! Thanks for working on this :)

I've left a few comments.

@efekrskl
Copy link
Contributor Author

efekrskl commented Nov 19, 2025

Thanks for the review @ovflowd, I've changed the implementation to use html/css only.

The changes to the data sources is also reverted (as they were wrong in the first place). Could you unblock your review @bmuenzenmeyer ?

{eolReleases.map(release => (
<Fragment key={release.major}>
<tr>
<tr data-lts={!!release.codename}>
Copy link
Contributor

Choose a reason for hiding this comment

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

smart!

@bmuenzenmeyer
Copy link
Contributor

I cannot get prettier to overwrite the current contents, which makes me think the failure is a false positive or caching problem

@ovflowd
Copy link
Member

ovflowd commented Nov 21, 2025

Thanks for the review @ovflowd, I've changed the implementation to use html/css only.

The changes to the data sources is also reverted (as they were wrong in the first place). Could you unblock your review @bmuenzenmeyer ?

Howdy! I'm on work travel, I'll be reviewing this later today or tomorrow!

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.

Enhance Vulnerability Table to Toggle LTS Versions

10 participants