zencart / documentation

Zen Cart FAQs and Developer Documentation
https://docs.zen-cart.com
MIT License
7 stars 27 forks source link

Possible changes to Section Menu #847

Closed simon1066 closed 1 year ago

simon1066 commented 2 years ago

I do find the left menu sidebar to be a bit difficult to navigate. The sidebar defaults with all sections expanded, showing all pages - that's a lot to scroll through. It's only after clicking on a section heading that everything but that section collapses, that's a bit more manageable but can still be a lot of pages to scroll through to get to the next section (First Steps for example).

I note that the Docsy submodule Zen Cart Docs uses hasn't been updated in 3/4 years, since then there has been a foldable section menu introduced, as exampled on this page: https://deploy-preview-518--docsydocs.netlify.app/docs/adding-content/navigation/#section-menu

scottcwilson commented 2 years ago

Give it a shot, let's see how it looks.

simon1066 commented 2 years ago

I'm think this might be above my pay grade. I believe the Docsy fileset used for the Docs is based on a 2019 sub-module commit by @drbyte (image attached) and in order to implement the collapsible side bar sections the theme commit would need to be updated (beyond my skillset). Whether a theme update would lead to unexpected behaviour of the Docs, I don't know.

Screenshot 2022-06-06 085350

simon1066 commented 2 years ago

Here's a test site showing how the collapsible sidebar sections might look. It's not as simple as just using the latest Docsy template, there are ZC customisations to the Docsy template in /layouts/partials and perhaps elsewhere.

Ignore the fact that there's a search bar in the sidebar, as well as using the latest Docsy template I had to overrwrite the /layouts/partials/sidebar-tree.html with their latest. There are all sorts of fancy icons available and accordion effects one can add - I didn't (the link in the first post).

Anyway, this is about a far as my knowledge will take me: https://simon1066.github.io/zendocs_test1/user/

scottcwilson commented 2 years ago

Nice. The search box is actually a win because it shows up on mobile too (which is missing in the current template). Do you want to build a PR? I much prefer what you have done to the original.

simon1066 commented 2 years ago

Yes, I think I can build a PR - it won't be small. I'm all hugo/docsy'd out for a bit but will get on to it.

If we are to leave a search box in the sidebar then I'll also amend the code to not have a search box in the header on mobile devices, as was the case with my previous PR.

scottcwilson commented 2 years ago

I had forgotten that you fixed the missing search on mobile! Thanks for doing that. Well, this is not a rush, take your time. But I do think it looks fantastic - definitely an improvement.

scottcwilson commented 2 years ago

Just updated the Docsy template to fix the google_news internal template issue.

simon1066 commented 2 years ago

I'll resubmit this PR to take account of this Docsy template upgrade.