Skip to content

Conversation

@efekrskl
Copy link

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 Oct 29, 2025 4:14pm

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

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
232 1 231 0
View the top 1 failed test(s) by shortest run time
test::generates release data with correct status
Stack Traces | 0.0436s run time
Error [ERR_TEST_FAILURE]: Expected values to be partially and strictly deep-equal:
+ actual - expected

  {
    codename: '',
+   currentStart: '2021-10-26',
+   endOfLife: '2024-10-18',
+   isLts: true,
+   ltsStart: '2022-10-18',
+   maintenanceStart: '2023-10-18',
-   isLts: false,
    major: 14,
+   minorVersions: [
+     {
+       modules: '83',
+       npm: '6.14.10',
+       releaseDate: '2021-04-20',
+       v8: '8.0.276.20',
+       version: '14.0.0',
+       versionWithPrefix: 'v14.0.0'
+     }
+   ],
    modules: '83',
    npm: '6.14.10',
    releaseDate: '2021-04-20',
    status: 'End-of-life',
    v8: '8.0.276.20',

    at async Promise.all (index 0) {
  code: 'ERR_TEST_FAILURE',
  failureType: 'testCodeFailure',
  cause: AssertionError [ERR_ASSERTION]: Expected values to be partially and strictly deep-equal:
  + actual - expected
  
    {
      codename: '',
  +   currentStart: '2021-10-26',
  +   endOfLife: '2024-10-18',
  +   isLts: true,
  +   ltsStart: '2022-10-18',
  +   maintenanceStart: '2023-10-18',
  -   isLts: false,
      major: 14,
  +   minorVersions: [
  +     {
  +       modules: '83',
  +       npm: '6.14.10',
  +       releaseDate: '2021-04-20',
  +       v8: '8.0.276.20',
  +       version: '14.0.0',
  +       versionWithPrefix: 'v14.0.0'
  +     }
  +   ],
      modules: '83',
      npm: '6.14.10',
      releaseDate: '2021-04-20',
      status: 'End-of-life',
      v8: '8.0.276.20',
  
      at TestContext.<anonymous> (.../runner/work/nodejs.org/nodejs..../generators/__tests__/releaseData.test.mjs:41:12)
      at async Test.run (node:internal/test_runner/test:980:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1358:7)
      at async startSubtestAfterBootstrap (node:internal/test_runner/harness:296:3) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: { currentStart: '2021-10-26', ltsStart: '2022-10-18', maintenanceStart: '2023-10-18', endOfLife: '2024-10-18', status: 'End-of-life', major: 14, version: '14.0.0', versionWithPrefix: 'v14.0.0', codename: '', isLts: true, npm: '6.14.10', v8: '8.0.276.20', releaseDate: '2021-04-20', modules: '83', minorVersions: [Array] },
    expected: { major: 14, version: '14.0.0', versionWithPrefix: 'v14.0.0', codename: '', isLts: false, npm: '6.14.10', v8: '8.0.276.20', releaseDate: '2021-04-20', modules: '83', status: 'End-of-life' },
    operator: 'partialDeepStrictEqual'
  }
}

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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

@bmuenzenmeyer bmuenzenmeyer force-pushed the feat/eol-table-lts-toggle branch from eb7d2fd to 4502c6c Compare October 29, 2025 10:09
@bmuenzenmeyer
Copy link
Contributor

bmuenzenmeyer commented Oct 29, 2025

rebased, the doc kit lockfile bump was causing errors - resolved via #8275

if my local testing is correct, there is a unit test yet to resolve

@bmuenzenmeyer
Copy link
Contributor

bmuenzenmeyer commented Oct 29, 2025

the logic changes here

image

make me increasingly sour on the strategy we have for determine node release states, and I think we should move toward the emerging plan within #8277 - even if this lands as a nice to have feature. looking for other thoughts on this

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.

blocking til we have alignment among @nodejs/nodejs-website - not necessarily directly related to this PR (the work is great and an improvement on UX, thank you, but more about our data source)

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.

@efekrskl
Copy link
Author

This PR is doing something that it shouldn't (Out of Scope): efekrskl/nodejs.org@f530878/apps/site/next-data/generators/releaseData.mjs

Yeah, in hindsight, maybe I should've created an issue or something. Because right now isLts just doesn't work at all for EOL releases, so at least some fix is needed.

@efekrskl
Copy link
Author

blocking til we have alignment among @nodejs/nodejs-website - not necessarily directly related to this PR (the work is great and an improvement on UX, thank you, but more about our data source)

all good! If I can in any way would be happy to help.

Copy link
Member

@canerakdas canerakdas left a comment

Choose a reason for hiding this comment

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

Sorry for the late review. I really like the feature, it makes reading the table easier! 🚀

Comment on lines +26 to +28
transition-colors
duration-100
ease-out
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
transition-colors
duration-100
ease-out
motion-safe:transition-colors
motion-safe:duration-100
motion-safe:ease-out

As a best practice for accessibility, it would be beneficial to apply animations using motion-safe https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html

focus-visible:ring-2
focus-visible:ring-green-500
focus-visible:ring-offset-2
focus-visible:ring-offset-neutral-900
Copy link
Member

Choose a reason for hiding this comment

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

I think the outline looks great! We can discuss this and later apply it to other components in a separate issue for design consistency

Just one little nitpick: it might be better to use the current outline for the dark theme and add a lighter background color for the light theme

image image

Comment on lines +45 to +46
h-5
w-5
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
h-5
w-5
size-5

Comment on lines +51 to +53
transition-transform
duration-100
ease-out;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
transition-transform
duration-100
ease-out;
motion-safe:transition-transform
motion-safe:duration-100
motion-safe:ease-out;


import * as SwitchPrimitive from '@radix-ui/react-switch';
import classNames from 'classnames';
import { FC, PropsWithChildren, useId } from 'react';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import { FC, PropsWithChildren, useId } from 'react';
import { useId } from 'react';
import type { FC, PropsWithChildren } from 'react';

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