-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Draft
canerakdas
wants to merge
42
commits into
nodejs:main
Choose a base branch
from
canerakdas:feat/simplified-download
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 22 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
3937420
feat: simplified download page
canerakdas fa51777
chore: resolve conflict
canerakdas 3e9cbeb
chore: fix type errors
canerakdas 8abad4e
chore: remove unused css file
canerakdas 924c640
refactor: release check and version without minor
canerakdas 9c375d5
refactor: better localization
canerakdas e586292
refactor: separate layout, markdown and sidebar logic
canerakdas 644882f
refactor: simple download utils
canerakdas 4a0fd1c
refactor: getNodeDownloadUrl args destructuring
canerakdas 426f4ed
refactor: localize and improve sidebar getter
canerakdas 1f6e3db
refactor: better naming, docs and alias import
canerakdas dfd47a0
chore: sidebargroup naming
canerakdas fd09988
fix: active simplified sidebar and more docs
canerakdas 0f1ae0a
feat: simple download meta bar added
canerakdas 9c96639
chore: details styles moved into the site app
canerakdas bb5c03c
chore: details styles moved into the site app
canerakdas 7f9c14b
fix: win x64, mac arm64 semver compat
canerakdas 107b9f7
refactor: self review
canerakdas b07ba56
docs: downloads table
canerakdas 5b30781
docs: fileoverview removed
canerakdas 17cc8a0
fix: layout import
canerakdas a92ad35
Update apps/site/next.mdx.use.mjs
canerakdas c7264ea
refactor: layout changes
canerakdas 199c3e6
refactor: renamed to download archive
canerakdas 8a43b85
refactor: enhance buildReleaseArtifacts
canerakdas 968517f
chore: resolve conflict
canerakdas 1e6e0f4
docs: updating according to layout/naming
canerakdas 52b6cdc
Update apps/site/util/downloadUtils/archive.tsx
canerakdas 2759b68
chore: review updates
canerakdas 7186a9b
Merge branch 'feat/simplified-download' of https://github.com/canerak…
canerakdas 2eaa893
fix: scroll and archive artifacts
canerakdas 31400af
refactor: minor versions table
canerakdas e516c0b
chore: lint
canerakdas 1417339
feat: release alert box
canerakdas 7358d16
chore: previous releases links
canerakdas b832299
refactor: version navigation and content
canerakdas 0fa1f1d
fix: separator, modal border color
canerakdas 2b17e6b
feat: DownloadReleasesTable download archive redirects
canerakdas f533ebc
refactor: markdown content editing and Node.js logo added
canerakdas 1c8abdd
feat: home page button redirects
canerakdas d241894
refactor: minor text and styling updates
canerakdas edaf4e1
Merge branch 'main' into feat/simplified-download
canerakdas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
'use client'; | ||
|
||
import { useTranslations } from 'next-intl'; | ||
import type { FC } from 'react'; | ||
|
||
import Link from '#site/components/Link'; | ||
import { OperatingSystemLabel } from '#site/util/downloadUtils'; | ||
import type { NodeDownloadArtifact } from '#site/util/downloadUtils/simple'; | ||
|
||
type DownloadsTableProps = { | ||
source: Array<NodeDownloadArtifact>; | ||
}; | ||
|
||
const DownloadsTable: FC<DownloadsTableProps> = ({ source }) => { | ||
const t = useTranslations(); | ||
|
||
return ( | ||
<table> | ||
canerakdas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<thead> | ||
<tr> | ||
<th>{t('components.downloadsTable.fileName')}</th> | ||
<th className="md:w-24"> | ||
{t('components.downloadsTable.operatingSystem')} | ||
</th> | ||
<th className="md:w-24"> | ||
{t('components.downloadsTable.architecture')} | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{source.map(release => ( | ||
<tr key={`${release.file}-${release.architecture}`}> | ||
<td data-label={t('components.downloadsTable.fileName')}> | ||
<Link href={release.url}>{release.file}</Link> | ||
</td> | ||
<td data-label={t('components.downloadsTable.operatingSystem')}> | ||
{OperatingSystemLabel[release.os]} | ||
</td> | ||
<td data-label={t('components.downloadsTable.architecture')}> | ||
{release.architecture} | ||
</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
); | ||
}; | ||
|
||
export default DownloadsTable; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@reference "../../../styles/index.css"; | ||
|
||
.root { | ||
@apply border-b | ||
border-neutral-200 | ||
px-0 | ||
pb-4 | ||
text-neutral-900 | ||
dark:border-neutral-800 | ||
dark:text-white; | ||
|
||
summary { | ||
@apply cursor-default | ||
select-none | ||
list-none | ||
after:float-right | ||
after:pr-4 | ||
after:text-2xl | ||
after:text-neutral-400 | ||
after:content-['›'] | ||
dark:after:text-neutral-600; | ||
|
||
h3 { | ||
@apply inline; | ||
} | ||
} | ||
|
||
&[open] summary { | ||
@apply pb-4 | ||
after:rotate-90 | ||
after:transform | ||
after:pt-4; | ||
} | ||
|
||
.detail { | ||
@apply flex | ||
select-none | ||
flex-col | ||
gap-4; | ||
} | ||
} |
canerakdas marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { FC, PropsWithChildren } from 'react'; | ||
|
||
import styles from './index.module.css'; | ||
|
||
type DetailsProps = { | ||
summary: React.ReactNode; | ||
canerakdas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
||
const Details: FC<PropsWithChildren<DetailsProps>> = ({ | ||
children, | ||
summary, | ||
}) => ( | ||
<details className={styles.root}> | ||
<summary> | ||
<h3>{summary}</h3> | ||
</summary> | ||
<div className={styles.detail}>{children}</div> | ||
</details> | ||
); | ||
|
||
export default Details; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { getLocale } from 'next-intl/server'; | ||
import type { FC } from 'react'; | ||
|
||
import { dynamicRouter } from '#site/next.dynamic'; | ||
|
||
const getMarkdownContent = async (locale: string, file: Array<string>) => { | ||
const filePathname = dynamicRouter.getPathname(file); | ||
|
||
// Retrieves the Markdown file source content based on the file path and locale | ||
// Uses dynamic routing to locate and load the appropriate markdown file | ||
// for the given locale and file path segments | ||
const { source, filename } = await dynamicRouter.getMarkdownFile( | ||
locale, | ||
filePathname | ||
); | ||
|
||
// Parses the Markdown/MDX source content and transforms it into a React component | ||
// Handles both standard Markdown and MDX files | ||
const { content } = await dynamicRouter.getMDXContent(source, filename); | ||
|
||
return content; | ||
}; | ||
|
||
type WithMarkdownContentProps = { | ||
file: Array<string>; | ||
}; | ||
|
||
const WithMarkdownContent: FC<WithMarkdownContentProps> = async ({ file }) => { | ||
const locale = await getLocale(); | ||
const content = await getMarkdownContent(locale, file); | ||
|
||
return content || null; | ||
canerakdas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
||
export default WithMarkdownContent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.