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

Dynamically render the navigation bar #24

Closed
josephlewis42 opened this issue Sep 16, 2024 · 3 comments · Fixed by #33
Closed

Dynamically render the navigation bar #24

josephlewis42 opened this issue Sep 16, 2024 · 3 comments · Fixed by #33
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@josephlewis42
Copy link
Collaborator

Currently, the navigation bar is generated for each document using a template. This leads to the following issues:

  • The DevDocs CSS doesn't work quite right because we're using native HTML tags to collapse/expand content rather than JS. Ideally, we'd be able to use DevDocs CSS out of the box.
  • Pages like the index and licenses are treated as special cases because that matches how they're done in DevDocs.
  • The highlighted page doesn't change as you navigate through the structure on the same page because there's no JS to react to navigation changes.
  • Each page in the ZIM has the full navigation tree embedded which causes significant size increases for navigation heavy documents.

Instead, we should dynamically generate the navbar using JS and some kind of optimized navigation intermediate representation in JSON that encodes all the special sorting and special case links that DevDocs does.

@josephlewis42 josephlewis42 added the enhancement New feature or request label Sep 16, 2024
@josephlewis42 josephlewis42 added this to the later milestone Sep 16, 2024
@benoit74
Copy link
Contributor

Agreed, thank you for detailing the issue and plan!

@josephlewis42 josephlewis42 self-assigned this Oct 3, 2024
@josephlewis42
Copy link
Collaborator Author

I'm working on this now. It's my first time using Vue2, WebComponents, and TypeScript together so there are a lot of learning opportunities!

@benoit74
Copy link
Contributor

benoit74 commented Oct 3, 2024

I hope you misspelled Vue2 and meant Vue3 ^^

If you did not already found it, you might be interested to have a look into https://github.com/openzim/youtube/tree/main/zimui or the soon-to-be-merged https://github.com/openzim/libretexts/tree/minimal_structure/zimui

Not that we are Vue3 experts at all, but this is our "state of the art" with our limited experience so far.

@benoit74 benoit74 modified the milestones: later, 0.2 Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants