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

WIP -- experimenting with navbar product selector #1434

Closed
wants to merge 2 commits into from

Conversation

kenjenkins
Copy link
Contributor

Docusaurus apparently does support custom properties on sidebar items, as long as they are nested under a 'customProps' object. (Individual pages can set these properties using the 'sidebar_custom_props' front matter key.)

Swizzle the DocSidebar component to add a wrapper that will filter the sidebar items depending on a 'products' custom property. Add a new custom navbar component to switch between products.

This doesn't work very well yet:

  • the currently-selected product isn't persisted anywhere
  • the dropdown menu doesn't dismiss when clicking an item
  • the active product is not highlighted in the dropdown menu

Docusaurus apparently does support custom properties on sidebar items,
as long as they are nested under a 'customProps' object. (Individual
pages can set these properties using the 'sidebar_custom_props' front
matter key.)

Swizzle the DocSidebar component to add a wrapper that will filter the
sidebar items depending on a 'products' custom property. Add a new
custom navbar component to switch between products.

This doesn't work very well yet.
Copy link

netlify bot commented May 28, 2024

Deploy Preview for pomerium-docs ready!

Name Link
🔨 Latest commit e0a0180
🔍 Latest deploy log https://app.netlify.com/sites/pomerium-docs/deploys/665658039c0aa6000875ab19
😎 Deploy Preview https://deploy-preview-1434--pomerium-docs.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.

@ZPain8464
Copy link
Contributor

ZPain8464 commented May 31, 2024

@kenjenkins I appreciate the help here. If we wanted to move forward with this approach, what would be next? I have a few items in mind:

  • Make "Zero" the default product selection (this would enforce the "Zero as happy path" approach)
  • Configure each product view so that the relevant "Quickstart" is the top-level item
  • Refactor "Deploy" sidebar slice so that product-specific pages aren't so nested. For example, /docs/deploy/k8s/ingress might be /docs/deploy/ingress
  • Make it so product-specific docs, like Clusters and Custom Domains, only appear in Capabilities or Concepts if that product is selected
  • I think we could leave tabs alone, unless we wanted to be so thorough that only the relevant tab appears for its product. For example, in configuration reference pages or our Identity Provider guides.

If this is the best path forward, I'd be happy to work on this.

@kenjenkins kenjenkins closed this Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants