carbon-design-system / gatsby-theme-carbon

A Carbon inspired Gatsby theme
https://gatsby.carbondesignsystem.com/
Apache License 2.0
352 stars 274 forks source link

Left nav tree component to support nested levels of navigation #1502

Closed szinta closed 3 weeks ago

szinta commented 1 month ago

Closes #1363

Add support for level two nesting in left side navigation menu using carbon's TreeView component.

Screenshot of side nav with 2 level nesting

image

Changelog

New

Changed

Removed

~The below listed are the pending tasks/known issues which needs to be fixed~

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gatsby-theme-carbon ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 10:04pm
netlify[bot] commented 1 month ago

Deploy Preview for gatsby-theme-carbon ready!

Name Link
Latest commit ddf9a52402bfab07333ba3cba62cc2175951f771
Latest deploy log https://app.netlify.com/sites/gatsby-theme-carbon/deploys/66c3c0a8d8ec8900084505d4
Deploy Preview https://deploy-preview-1502--gatsby-theme-carbon.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

oliviaflory commented 1 month ago

@szinta this looks really great!

I agree with @alisonjoseph that we could label the tree nav demo a bit better

What do you two think of either of these two options?

  1. Demo level X
  2. Demo tree nav level X Screenshot 2024-08-14 at 12 10 53 PM

And a small change after we decide what the nav items should be called: the navigation label and the lead space title should always be the same text ie "Page 3" and "Page 3" or "Demo level 1" and "Demo level 1". Screenshot 2024-08-14 at 12 13 21 PM

alisonjoseph commented 1 month ago

I prefer the first option I think. Screenshot 2024-08-14 at 11 19 46 AM

oliviaflory commented 1 month ago

Thanks @alisonjoseph! @sintaibm here's a mock up of the tree demo exposed and the lead space title example:

Screenshot 2024-08-14 at 4 43 35 PM
szinta commented 1 month ago

@oliviaflory Using identical titles for multiple leaf nodes at the same level (for instance, having all the leaf nodes under Demo level 1 titled Demo level 2) is not feasible. So, I’ve adjusted the titles for those leaf nodes. Please review the updated titles and provide feedback or suggestions for improving the navigation menu titles and page description.

image
alisonjoseph commented 1 month ago

Yes, that works!

alisonjoseph commented 4 weeks ago

Small issue remaining with icon color in dark mode. image