Skip to content

Conversation

@mlange-42
Copy link
Contributor

It was bothering me a bit to have to scroll down to the list of sub-pages. Only when on a subpage, sibling pages appear in the sidebar navigation.

Modified the nav sidebar layout to include sub-pages when on a top-level page.

Screenshot of the sidebar when on the About page, before the change:

grafik

After the change:

grafik

@cmbarton
Copy link
Contributor

cmbarton commented Sep 1, 2022

This bothered me too. I took a quick look and realized it was a bit more complicated to change than I thought because the hot links at the bottom are on a separate page somehow. How did you deal with them?

@mlange-42
Copy link
Contributor Author

Didn't touch the links at the bottom. Also not sure why they should be related to the nav bar, technically?
It probably does not hurt to leave them in place, so readers can't miss the sub-sections. Despite the redundancies.

@cmbarton cmbarton requested review from alee and chporter September 2, 2022 17:04
@cmbarton cmbarton added OMF site enhancement New feature or request OMF site web interface issues pertaining to web interface and usability OMF site content labels Sep 2, 2022
@alee
Copy link
Member

alee commented Sep 2, 2022

Thanks for the PR @mlange-42 ! This is a clear improvement but it exposes a larger problem - apparently we are still using docsy theme code from v0.1.0 of docsy and should upgrade to the latest release, v0.4.0 which has numerous improvements and changes but also breaks some of the ways we were extending / modifying the theme. Here's what it looks like with the latest v0.4.0 sidebar-tree template:

image

I think it might be worth the time to invest upgrading to the latest version of docsy to resolve this issue as well as the others and can continue to push those changes to this branch. Thoughts?

Copy link
Member

@alee alee left a comment

Choose a reason for hiding this comment

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

we should consider upgrading the theme code that's mostly been copy-pastaed from the docsy theme with the latest v0.4.0 e.g., https://github.com/google/docsy/blob/main/layouts/partials/sidebar-tree.html

This probably also affects page-meta-links.html and all the other customized files in layouts

@cmbarton
Copy link
Contributor

cmbarton commented Sep 2, 2022

I agree about updating to a better looking and more flexible web overlay. Any idea how much will break if we upgrade? With the recent papers, it would be a very good time for the site to be looking and working better--and at the same time not so good a time for it to be broken.

@mlange-42
Copy link
Contributor Author

Please don't care for this PR while updating. It is a very quick fix. Probably the functionality I added here is already there in v0.4.0. At least in another project using Docsy, I got it out of the box.

Generally, I think updating it a good thing. The longer you wait, the more breaking changes.

@mlange-42
Copy link
Contributor Author

I agree about updating to a better looking and more flexible web overlay. Any idea how much will break if we upgrade? With the recent papers, it would be a very good time for the site to be looking and working better--and at the same time not so good a time for it to be broken.

Should not be a problem to fix it on a branch, and merge into develop when not broken anymore.

@alee
Copy link
Member

alee commented Sep 2, 2022

The PR already exists and explains the issue well so if you don't mind keeping the fork/branch open I'll add the changes here and lay the changes on top 😅

Please don't care for this PR while updating. It is a very quick fix. Probably the functionality I added here is already there in v0.4.0. At least in another project using Docsy, I got it out of the box.

Generally, I think updating it a good thing. The longer you wait, the more breaking changes.

alee added 12 commits September 2, 2022 16:02
remove unnecessary shortcodes already provided by docsy
    - include -> readfile
    - imgproc already provided, no need to reimplement

replace npm package.json with tagged google/docsy github reference

TODO:

- use docsy as a hugo module instead of a git submodule

    https://www.docsy.dev/docs/get-started/docsy-as-module/

- remove sidebar-tree, figure out how to customize the right sidebar as
it was rendered in the old site
base docsy layouts for the docs type are good enough, only need to
customize layouts/partials/page-meta-links.html

TODO: changes incoming to reflect latest version of docsy
page-meta-links as well as shifting to using Docsy as a Hugo Module
docsy now recommends that it be used as a Hugo Module instead of as a
git submodule:

https://www.docsy.dev/docs/updating/convert-site-to-module/
- package.json and yarn.lock no longer needed due to hugo module change
- Makefile no longer needs to update submodule
- minor refinements to footer for responsiveness
in a vain effort to get the workflow check running again
@alee alee merged commit 50f0a53 into openmodelingfoundation:develop Sep 8, 2022
@mlange-42 mlange-42 deleted the nav-sub-pages branch September 8, 2022 08:18
@alee alee mentioned this pull request Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OMF site content OMF site enhancement New feature or request OMF site web interface issues pertaining to web interface and usability

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants