feat: Introduce Downloads Archive page#7794
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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.mdxandDownloadSimpleLayoutfor the new page - Update
getNodeDownloadUrlsignature and its callers to use an options object - Add
DownloadsTable,Details, andWithSimplifiedDownloadcomponents
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
DownloadsTableto verify it renders rows correctly for differentsourceinputs.
'use client';
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Caner Akdas <canerakdas@gmail.com>
ovflowd
left a comment
There was a problem hiding this comment.
Alrighty, I gave my last round of reviews. After this, let's get this merged! Thank you so much for all the work here!
AugustinMauroy
left a comment
There was a problem hiding this comment.
WOW i was little bit off website thing and I saw that. just awesome
| if (version === 'current') { | ||
| const releaseData = provideReleaseData(); | ||
|
|
||
| const release = releaseData.find(release => release.status === 'Current'); |
There was a problem hiding this comment.
I assume this will get the latest version, right?
There was a problem hiding this comment.
Yes, as we discussed here, it refers to the latest version (not the LTS one)
| // Extract version from pathname | ||
| const version = extractVersionFromPath(pathname); | ||
|
|
||
| if (version == null) { |
There was a problem hiding this comment.
Will a situation where users can reach on this Provider with this being null ever happen? I just worry that this isn't really needed. I think you can remove this null statement fully. Otherwise, let me know in which situation this happened 🤔
| // Find the release data for the given version | ||
| const releaseData = provideReleaseData(); | ||
| const release = releaseData.find( | ||
| release => semVer.major(version) === release.major |
There was a problem hiding this comment.
Do we need to call semver here? semver is unfortunately expensive. Won't the version here actually already be a string that matches release.major?
There was a problem hiding this comment.
In release data, we keep data for minor and major versions under the major version. Since we're creating a page for minor versions, we need to find the major version of the incoming version here.
As an alternative to the current usage, I could add a check like version.startsWith(v${release.major}), but that seems like too much of a manual check to me, WDYT?
|
@canerakdas I'll merge this now, feel free to do any further change onm follow-up PRs. |
Description
This PR introduces a new statically generated page that displays simplified download options by major version:
Also includes a download table of other minor versions of the major version;

Since I included the minor versions as a table, the content became quite lengthy. To prevent this, I used the HTML
detailselement. 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 disabledI am open to suggestions for to add / remove content 🙇
Validation
The links below are accessible in the preview;
Related Issues
Addresses #7443
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.