You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the issue that requires nodejs/nodejs.org to be already as a monorepo or have a way that we can import the React Components created from there;
We would also need to add the API Docs-specific Components to this repository within the mdx-react generator folder. Layouts (header, footer, navigation) must probably exist within the react-web generator (?).. I assume that a good chunk can be reused from the Node.js Website ones.
Version history selector similar to @node-core/ui-components/Common/Select for displaying API changes across versions.
Props:
changes: Array of change objects with structure:
{versions: string[],// e.g., ["v18.0.0", "v19.1.0", "v20.0.0"]label: string,// e.g., "Added in", "Deprecated in", "Removed in"url?: string// Optional link to changelog/release notes}
Example:
<ChangeHistorychanges={[{versions: ["v16.0.0"],label: "Added in ...",url: "https://github.com/nodejs/node/pr/url"},{versions: ["v18.0.0","v18.1.0"],label: "Modified in ..."},{versions: ["v20.0.0"],label: "Deprecated in ...",url: "https://github.com/nodejs/node/pr/url"}]}/>
Design
SideBar (Done)
Navigation sidebar for documentation pages, similar to @node-core/ui-components/Container/SideBar.
Props:
versions: Array of available documentation versions (e.g., ["v18.0.0", "v20.0.0", "v21.0.0"])
currentVersion: Currently selected version (e.g., "v20.1.0")
currentPage: Current page identifier for highlighting (e.g., "async_context.html")
For CodeBox and CodeTabs make them living in @node-core/ui-component
We already have base implementations there. The ones here should simply be a wrapper around those matching the wrappers we use on the website. (For example, adding the copy/paste functionality).
The other components, however, should like in ui-components, so they can be tested with Storybook.
All react components have been written (one still needs to land in ui components). this'll close once they are all merged into this repository in the linked PR.
I've self assigned to discourage users from taking on this issue, since it's all but completed.
Activity
Avinashshiyani commentedon Aug 15, 2024
I can help you with that
AugustinMauroy commentedon Sep 11, 2024
Update on that:
nodejs/nodejs.orgas a monorepoOnce we've created the UI package, we can open an output suite to create the components.
avivkeller commentedon May 27, 2025
CodeBox(Done)Implementation to match: nodejs.org CodeBox
CodeTabs(Done)Implementation to match: nodejs.org CodeTabs
DataTag(Done)ChangeHistory(In Review)Version history selector similar to
@node-core/ui-components/Common/Selectfor displaying API changes across versions.Props:
changes: Array of change objects with structure:Example:
Design
SideBar(Done)Navigation sidebar for documentation pages, similar to
@node-core/ui-components/Container/SideBar.Props:
versions: Array of available documentation versions (e.g.,["v18.0.0", "v20.0.0", "v21.0.0"])currentVersion: Currently selected version (e.g.,"v20.1.0")currentPage: Current page identifier for highlighting (e.g.,"async_context.html")docPages: Array of documentation page objects:Example:
Design
MetaBar(Done)Wrapper of
@node-core/ui-components/Containers/MetaBar.Props:
headings: Array of heading objects for table of contents:addedIn: Version when documentation/module was added (e.g.,"v0.10.0")readingTime: Estimated reading time (e.g.,"9 min read")viewAs: Array of alternative view formats:editThisPage: GitHub URL for editing the current pageExample:
Prop-less Wrapper Components
NavBar: Wrapper of@node-core/ui-components/Containers/NavBar(Done)[-]Start writing React components from Figma Designs[/-][+]Write React Components[/+]AugustinMauroy commentedon May 28, 2025
For
CodeBoxandCodeTabsmake them living in@node-core/ui-componentavivkeller commentedon May 28, 2025
We already have base implementations there. The ones here should simply be a wrapper around those matching the wrappers we use on the website. (For example, adding the copy/paste functionality).
The other components, however, should like in
ui-components, so they can be tested with Storybook.ovflowd commentedon May 28, 2025
Good stuff! Thanks for documenting this!
avivkeller commentedon Jun 15, 2025
All react components have been written (one still needs to land in ui components). this'll close once they are all merged into this repository in the linked PR.
I've self assigned to discourage users from taking on this issue, since it's all but completed.