Skip to content

feat: Introduce Downloads Archive page #7794

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

Open
wants to merge 54 commits into
base: main
Choose a base branch
from

Conversation

canerakdas
Copy link
Member

@canerakdas canerakdas commented May 31, 2025

Description

This PR introduces a new statically generated page that displays simplified download options by major version:

image

Also includes a download table of other minor versions of the major version;
image

Since I included the minor versions as a table, the content became quite lengthy. To prevent this, I used the HTML details element. The main reason I didn't use Radix Primitive Accordion is that we want this page to be fully usable even for users who have JavaScript disabled

I am open to suggestions for to add / remove content 🙇

Validation

The links below are accessible in the preview;

  • /download/{major}
  • /download/archive

Related Issues

Addresses #7443

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.

@Copilot Copilot AI review requested due to automatic review settings May 31, 2025 12:02
@canerakdas canerakdas requested a review from a team as a code owner May 31, 2025 12:02
Copy link

vercel bot commented May 31, 2025

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Aug 3, 2025 0:51am

Copy link
Contributor

@Copilot 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 new simplified downloads page that’s fully server-rendered (no JS required) and provides major‐version download summaries, with expandable minor versions under <details>. It also centralizes download utilities and updates the download URL API to use an options object.

  • Introduce simplified.mdx and DownloadSimpleLayout for the new page
  • Update getNodeDownloadUrl signature and its callers to use an options object
  • Add DownloadsTable, Details, and WithSimplifiedDownload components

Reviewed Changes

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

Show a summary per file
File Description
util/downloadUtils/index.tsx Exported DownloadDropdownItem type
util/downloadUtils/constants.json Added compatibility ranges for platforms
util/tests/getNodeDownloadUrl.test.mjs Updated tests for new getNodeDownloadUrl signature
types/layouts.ts Added 'download-simple' layout type
pages/en/download/simplified.mdx New MDX page with simplified download UI
next.mdx.use.mjs Registered new MDX components (WithSimplifiedDownload, etc.)
next.dynamic.constants.mjs Configured dynamic routing and exclusions for new page
layouts/DownloadSimple.tsx New layout wrapping simplified download content
components/withSimplifiedDownload.tsx HOC to provide download data and sidebar items
components/withProgressionSidebar.tsx Refactored to accept both navKey and explicit groups
components/withMetaBar.tsx Made items injectable for meta‐bar
components/withMarkdownContent.tsx New HOC to load MDX content at runtime
components/withLayout.tsx Added DownloadSimpleLayout to layout mapping
components/MDX/Details New <Details> component for collapsible sections
components/Downloads/Release/ReleaseCodeBox.tsx Updated “no-script” link to point at new simplified page
components/Downloads/Release/PrebuiltDownloadButtons.tsx Switched getNodeDownloadUrl calls to object syntax
components/Downloads/DownloadsTable New table for listing artifacts
components/Downloads/DownloadLink.tsx Updated to new getNodeDownloadUrl API
components/Downloads/DownloadButton Updated to new getNodeDownloadUrl API
Comments suppressed due to low confidence (1)

apps/site/components/Downloads/DownloadsTable/index.tsx:1

  • Consider adding unit tests for DownloadsTable to verify it renders rows correctly for different source inputs.
'use client';

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Caner Akdas <canerakdas@gmail.com>
@ovflowd
Copy link
Member

ovflowd commented Aug 2, 2025

Is this still blocked?

@canerakdas canerakdas removed the blocked label Aug 2, 2025
@canerakdas canerakdas marked this pull request as ready for review August 2, 2025 22:04
@ovflowd
Copy link
Member

ovflowd commented Aug 2, 2025

image

Can we make the dropdown render the versions as how we have on the new API docs redesign? What I mean are the vXX.x

image

@ovflowd
Copy link
Member

ovflowd commented Aug 2, 2025

image

Can the scrollbar be inside the table? So that only the rows move and the header stays static?

@ovflowd
Copy link
Member

ovflowd commented Aug 2, 2025

image

Non-JavaScript version of Select should have pointer cursor

@ovflowd
Copy link
Member

ovflowd commented Aug 2, 2025

Also, clicking esc should close the select dropdodwn 🤔

… stateless select fixes
@canerakdas
Copy link
Member Author

Also, clicking esc should close the select dropdodwn 🤔

Unfortunately, the <details> element in the browser doesn't close when pressing the esc key, and since JavaScript is disabled, we can't handle it manually either

@avivkeller
Copy link
Member

@canerakdas What's the status here?

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.

Simplified Downloads page for non-JS-enabled environments
6 participants