Add three-level documentation navigation tree#5769
Draft
evnchn wants to merge 2 commits intozauberzeug:mainfrom
Draft
Add three-level documentation navigation tree#5769evnchn wants to merge 2 commits intozauberzeug:mainfrom
evnchn wants to merge 2 commits intozauberzeug:mainfrom
Conversation
Introduces `doc.intro_group()` for 3-level tree nesting in the sidebar. Each section now uses subsection modules to group related elements (e.g., Controls > Buttons > Button, Button Group, etc.), improving discoverability while preserving the curated semantic ordering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
|
I am responsible for the UI decisions in this PR, and Claude Code is forced to implement it in a loop until the screenshots look right. |
Contributor
|
Maybe it's a good opportunity to also organize documentation *.py files in subfolders, mimicking the tree structure. (Similarly we might want introduce subfolders for our tests/, mirroring the nicegui/ directory that is being tested. But that's for a separate PR.) |
The flat content/ directory (~150 files) is now organized into subfolders that mirror the documentation tree structure, improving navigability. The doc framework module is renamed to _doc/ to distinguish it from content sections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Addresses feedback from discussion #5744 proposing a categorized three-level menu structure for the documentation sidebar. The current 2-level tree (Section > Element) becomes hard to scan as the number of elements grows. A 3-level tree (Section > Subsection > Element) groups related elements together, improving discoverability while preserving the curated semantic ordering.
Implementation
doc.intro_group()— new API similar todoc.intro(), but creates a group header with all of the target page's parts as children. The tree builder uses these children for the third nesting level.DocumentationPart.children— new field enabling grouped parts for tree nesting without changing page rendering.subsection_*.pymodules (35 new files) — each defines a subsection title and usesdoc.intro()to reference existing*_documentation.pymodules. Section files now usedoc.intro_group()to reference these subsection modules.tree.py— updated to build 3-level hierarchy from grouped parts. Group nodes are always expanded viaon_expandhandler and CSS hiding of expand arrows.rendering.py— renders grouped parts inline (group header + children) on section pages./documentation/section_controls#buttons).Before (2-level):
After (3-level):
Important
The specific grouping of elements into subsections and the UI/UX are to be finalized. This PR establishes the technical mechanism and proposes an initial grouping based on the community discussion. Feedback is welcome on:
Progress
🤖 Generated with Claude Code