Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Refactor navigation #29

Merged
merged 4 commits into from
Feb 13, 2024
Merged

Conversation

wyhaines
Copy link
Collaborator

The navigation components were all stuffed into a single file. I refactored them into multiple files so that it's easier to work with just parts of the navigation implementation. The components were then modified to expand/collapse navigation depending on the page open, and what is clicked on. As we add more documentation content, navigation that shows everything all of the time will get awfully long and noisy. This keeps it more compact.

This code was ported over with minimal changes from the code for the EEAP site, except for removing some of the code related to gated content. This means that the navigation component does not support disabled items. These are items that one wants to appear in the navigation, but one doesn't want to be clickable. One use case for this is when there is content that is planned or in development, the navigation items for it, disabled, can be released ahead of the content itself, in order to tease the upcoming release of that content.

Description

StaticNav.tsx becomes StaticNav.tsx, NavGroup.tsx, and NavItem.tsx. Navigation opens and closes based on which page is open, and where one clicks in the navigation.

PR Checklist:

  • [ x ] I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

…ation so that navigation groups expand/collapse, based on the current open page, and where one clicks in the navigation.
Copy link

netlify bot commented Feb 12, 2024

Deploy Preview for toposware-docs-platform ready!

Name Link
🔨 Latest commit f25cdee
🔍 Latest deploy log https://app.netlify.com/sites/toposware-docs-platform/deploys/65cbe0f8bc7ec200086a9744
😎 Deploy Preview https://deploy-preview-29--toposware-docs-platform.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.

@wyhaines wyhaines changed the title WIP: Refactor navigation Refactor navigation Feb 12, 2024
@wyhaines wyhaines marked this pull request as ready for review February 12, 2024 22:41
@wyhaines wyhaines requested a review from Dune1955 February 12, 2024 22:41
@wyhaines wyhaines merged commit bd15521 into main Feb 13, 2024
4 checks passed
@wyhaines wyhaines deleted the kh.add-expanding-navigation-components branch February 13, 2024 23:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants