Skip to content

Commit

Permalink
[docs][infra] fix deeply nested left nav item not expand (#17124)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Currently, when a user lands on a page that's nested in 3+ levels, the
left nav won't expand. This PR fixes this issue.

| Status quo | Fix |
| ------------- | ------------- |
|
https://docs.dagster.io/dagster-cloud/account/managing-users/managing-teams
|
https://10-10--docs-infra-fix-deeply-nested-left-nav-item-not-expand.dagster.dagster-docs.io/dagster-cloud/account/managing-users/managing-teams
|
| <img width="882" alt="image"
src="https://github.com/dagster-io/dagster/assets/4531914/2df7d0ba-df34-4537-92fb-4e8b893db0dd">
| <img width="921" alt="image"
src="https://github.com/dagster-io/dagster/assets/4531914/7ea77d52-0b60-4e23-a36e-cef439891ad2">|


## How I Tested These Changes
  • Loading branch information
yuhan authored Oct 10, 2023
1 parent 3f2c306 commit 677a68f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/next/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ const RecursiveNavigation = ({
itemOrSection === currentSection ||
itemOrSection.path === asPathWithoutAnchor ||
(itemOrSection.children &&
itemOrSection.children.find((item) => item.path === asPathWithoutAnchor));
itemOrSection.children.find((item) => asPathWithoutAnchor.startsWith(item.path)));

const expanded = Boolean(navKeysToExpanded[navKey]);

Expand Down

1 comment on commit 677a68f

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for dagster-docs ready!

✅ Preview
https://dagster-docs-4hkfhfq0z-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit 677a68f.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.