-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Migrate NavigationComponents
from nodejs.dev
#5428
Comments
The plan and layout looks good to me Please keep me on loop |
@ashutosh887 You can take one component to work on. Don't take an component already taken by someone. |
@ashutosh887 feel free to grab any component you want to work on :) But I would heavily recommend that y'all first discuss the migration here before making a PR. @AugustinMauroy I saw you made a PR already, but it has the same props/structure of the existing Navigation Component. I would (as I mentioned before) recommend that we discuss the structure (type) of a Navigation Item, Navigation Section and Navigation itself beforehand here 😄 |
Yup you have true big part but the component I had work it's an container for nav. |
FYI: I'm looking deeply about navigation.
|
The learn navigation should be inside IMHO it doesn't make sense to put the order on Frontmatter, it would also be pretty impractical. |
Not really. We can still code the API Navigation Components even if they're not going to be used. We can always estipulate how the data would look like. |
IMHO: Yaml is better for new comer |
Yes, but I don't recall it being natively able to be imported by TypeScript. We need a specific loader to be able to load YAML and that loader would be a WebPack loader. So yes, the YAML convention could sound friendlier in certain ways, but it's too much of a burden to be adopted. |
That true and what do you thinks about using an type about = {
XXX
}
export const aboutNav: about = {
XXX
} |
I'm sorry, I have no idea what you're referring to 😅 |
I just propose we can change And we'll have:
|
Why do we need typing on a navigation file? I'm not inclined in making a TypeScript file just for a bunch of navigation entries. This has worked well (the JSON) for years, and I've never seen (on my time here) anybody complaining about it 🤔 |
Typescript just allows us to have types, so we get an error during the build if someone makes a mistake in the navigation file. |
This is not the sort of file that changes often. And mistakes will be noted on PRs. The structure of the navigation itself is simple enough. And I rather have a no-code approach. JSON in this case is still simpler. I don't see a benefit of having types here, as during the import the IDE's will already complain if the structure of the JSON file differs from the types we create on our types folder. So if the JSON import has a diverging type (which is implicitly generated by There's no point on making this file TypeScript. |
Hey, working on |
|
This issue is going to be closed as the Navigation Components will be completely new. |
Continuing the migration of components from
nodejs.dev
that we started here, we should start migrating theNavigationComponents
andnavigations
from thenodejs.dev
repository.This issue will keep track of these components and their development progress.
The Migration of each Component
components/Navigation
folder on this repositorycomponents/Navigation/Something
)hooks
folder of the repository.Dark Theme Switcher
), if it is straightforward enough (e.g. a dark theme switcher plugin for Next.js or it is simple enough to code by ourselves, e.g. a Hook that we manage together with a React Provider) then feel free to do it.Navigation System
The Navigation system is done on
nodejs.dev
was done in a certain abstract manner. Yet it has a lot of Gatsby-specific types and logic and the components were done to "work" with the dynamic nature of Gatsby and GraphQL. This is not what we want here.The whole navigation of our Website is static and done here.
We want to introduce a Navigation System that supports our static featurette and can still have different styles.
How the migration should work
navigation.json
navigation.json
need to be updated to support the future use cases and current legacy-codeheader
for header navigation (the redesignedNewHeader
needs to be updated to support that)footer
for footer navigation (the redesignedNewFooter
needs to be updated to support that)learn
for learn sidebar navigationsidebar
for regular sidebar navigationapi
for API pages sidebar navigationblog
for Blog Navigation. This is the only dynamic one that comes from NextragetStaticProps
and is not defined onnavigation.json
.What this means for
nodejs.dev
components?The components on
NavigationComponents
will probably need to be worked from scratch, where very little will be reused (besides styles and general DOM/Element structure)How are we going to coordinate the prerequisites for the Navigation components?
All new logic, types and requirements and technical discussion should be done in this issue so that all interested contributors can be on par.
List of Components to Migrate
Navigation
@AugustinMauroyNavigationItem
NavigationSection
ApiNavigation
navigations/ApiNavigation/
SidebarNavigation
navigations/SidebarNavigation/
LearnNavigation
navigations/LearnNavigation/
BlogNavigation
navigations/BlogNavigation/
The text was updated successfully, but these errors were encountered: