- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.4k
feat: add toggle to show/hide LTS releases #8263
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
base: main
Are you sure you want to change the base?
Conversation
| The latest updates on your projects. Learn more about Vercel for GitHub. 
 | 
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.
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 isLtsdetermination logic to useltsStartinstead 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.
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.
Wow! Thanks for this!
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.
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.
| 
 Thanks for the quick review! | 
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.
lgtm for web infra bits, thank you!
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.
LGMT !
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.
| ❌ 1 Tests Failed:
 View the top 1 failed test(s) by shortest run time
 To view more test analytics, go to the Test Analytics Dashboard | 
      
        
              This comment was marked as outdated.
        
        
      
    
  This comment was marked as outdated.
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.
LGTM, it looks cool to be able to do that
| Lighthouse Results 
 | 
eb7d2fd    to
    4502c6c      
    Compare
  
    | 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 | 
| the logic changes here   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 | 
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.
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)
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.
This PR is doing something that it shouldn't (Out of Scope): https://github.com/efekrskl/nodejs.org/blob/f530878450c63aee83ab09bbaa615bfe45105601/apps/site/next-data/generators/releaseData.mjs
| 
 Yeah, in hindsight, maybe I should've created an issue or something. Because right now  | 
| 
 all good! If I can in any way would be happy to help. | 
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.
Sorry for the late review. I really like the feature, it makes reading the table easier! 🚀
| transition-colors | ||
| duration-100 | ||
| ease-out | 
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.
| 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 | 
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.
| h-5 | ||
| w-5 | 
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.
| h-5 | |
| w-5 | |
| size-5 | 
| transition-transform | ||
| duration-100 | ||
| ease-out; | 
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.
| 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'; | 
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.
| import { FC, PropsWithChildren, useId } from 'react'; | |
| import { useId } from 'react'; | |
| import type { FC, PropsWithChildren } from 'react'; | 



Description
Adds a toggle to the EOL table that filters non LTS releases
Validation
Content being filtered:

Other:



Related Issues
Closes #8017
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.