Skip to content
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

feat(nav): Stop using config for primary navigation #83666

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

malwilley
Copy link
Member

The plan is to stop using the config and just render items as JSX. This moves all the primary items in the config over to JSX. No behavior changes.

@malwilley malwilley requested a review from a team January 17, 2025 19:21
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 17, 2025
<Fragment>
<SidebarBody>
<SidebarItem
item={{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything in this file was taken from sidebar.tsx except for the below items which used to be defined in a config file

Comment on lines +112 to +116
if (!to) {
throw new Error(
`Nav item "${item.label}" must have either a \`dropdown\` or \`to\` value!`
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this not be done via typescript

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this was existing code. I'm getting rid of the item prop anyway, once I'm fully off the config you'll just render a link or dropdown depending on what you want

@malwilley malwilley merged commit 8034317 into master Jan 17, 2025
42 checks passed
@malwilley malwilley deleted the malwilley/ref/nav-primary-config branch January 17, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants