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

Deeply nested pages not showing as active in side navigation #149

Open
bartaz opened this issue Oct 14, 2022 · 14 comments
Open

Deeply nested pages not showing as active in side navigation #149

bartaz opened this issue Oct 14, 2022 · 14 comments
Assignees

Comments

@bartaz
Copy link
Contributor

bartaz commented Oct 14, 2022

Issue reported by @tmihoc

Some documentation needs deeper nesting than side navigation allows (4 or more levels).
It's fine for these items not to appear in the side navigation itself, but currently, when navigating to such pages the context of the hierarchy is lost, because such pages don't appear in side nav, and they don't keep the active/expanded parents in side navigation.

For example a page: https://juju.is/docs/sdk/config-changed-event
It's meant to be under Reference > Event > List of events > config-changed
But when going to this page, side navigation doesn't reflect that.

image

Expected:

If the page is deeply nested, it should still keep the "last known" parent page expanded and shown in the side navigation:

image

@bartaz
Copy link
Contributor Author

bartaz commented Oct 14, 2022

@tmihoc Feel free to provide any more details to this if you think it's needed, thanks!

@bartaz
Copy link
Contributor Author

bartaz commented Jan 11, 2023

@nottrobin could this be given some priority, docs team is waiting for that

@tmihoc
Copy link
Member

tmihoc commented Jan 11, 2023

Thanks, @bartaz ! I think what we discussed was along the lines of:

  1. In the Navigation table: Make it possible to have level 4 and 5. (If I use them now I get an error, I think. Which is why I list such titles at the end with an empty level.)

  2. On the website: Continue rendering only levels 1-3 but, for any links to level 4 or 5 docs, keep the Navigation view at the parent level 3, for context.

@tmihoc
Copy link
Member

tmihoc commented Feb 16, 2023

@bartaz @nottrobin Are there any updates on this?

@nottrobin
Copy link
Contributor

nottrobin commented Feb 16, 2023

@tmihoc: Are there any updates on this?

We hadn't planned this in yet. I've just added it to our board. I'll hope to squeeze it into this iteration or next, so hopefully by March 10th.

@tmihoc: Thanks, @bartaz ! I think what we discussed was along the lines of:

  • In the Navigation table: Make it possible to have level 4 and 5. (If I use them now I get an error, I think. Which is why I list such titles at the end with an empty level.)
  • On the website: Continue rendering only levels 1-3 but, for any links to level 4 or 5 docs, keep the Navigation view at the parent level 3, for context.

I see a couple of drawbacks with this implementation:

  • It makes the navigation list in Discourse much longer, unwieldy
  • People need to already know that levels 4 and 5 are hidden, otherwise they'll probably expect it to show up and assume something's broken

Would it be better to introduce a new item in the metadata, something like "nav_parent", and then put the URL of the parent in there (in this case /docs/sdk/list-of-events)?

@tmihoc
Copy link
Member

tmihoc commented Feb 16, 2023

I cannot advise on the implementation. That was just a suggestion. My main point is (1) I and others often need to use level 4 and sometimes also 5 and (2) if we do that currently using a null level, the Navigation just shows the default, giving no clue as to the parent level 3 page.

@nottrobin
Copy link
Contributor

nottrobin commented Feb 16, 2023

I and others often need to use level 4 and sometimes also 5

If the nevigation levels 4 and 5 never show up at all, and all it means is that their level 3 parent is highlighted, why would you ever need 2 additional levels? What's the use of level 5, if all it means is that level 3 is highlighted in the nav?

@tmihoc
Copy link
Member

tmihoc commented Feb 16, 2023

It just shows the logical relation between the docs. Right now I just have to keep it in mind, or add more null-level rows in the Navigation above a set of null-level level 4/5 rows to clarify what they're about. Which I can continue doing, so if think it would reduce the amount of work you need to do to just making sure that the parent level 3 stays highlighted.

@nottrobin
Copy link
Contributor

nottrobin commented May 17, 2023

I dropped the ball on this last cycle, sorry. I've moved this into this JIRA task and I'll see when I can schedule it in, although it's a challenge this cycle with PS5 migration etc.

@tmihoc
Copy link
Member

tmihoc commented Jun 16, 2023

@nottrobin any updates on this?

@tmihoc
Copy link
Member

tmihoc commented Jul 11, 2023

@nottrobin

@bartaz
Copy link
Contributor Author

bartaz commented Jul 11, 2023

@tmihoc Robin left Canonical recently unfortunately.

I don't know who could be able to prioritise those discourse tasks now. Our systems squad shrunk down to a single person (@samhotep) who is focused on infrastructure and PS5 migration now.

Do you have any suggestions @anthonydillon ?

@anthonydillon anthonydillon self-assigned this Jul 13, 2023
@pengwyn
Copy link

pengwyn commented Jul 25, 2023

I noticed that this seems to have been enabled on the Ubuntu Server discourse: https://discourse.ubuntu.com/t/ubuntu-server-documentation/11322, for example https://ubuntu.com/server/docs/security-smart-cards-ssh.

Maybe the configuration can be borrowed from there?

@tmihoc
Copy link
Member

tmihoc commented Oct 17, 2023

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants