Documentation structure #1807
Replies: 3 comments 3 replies
-
Thanks, @ed2050, for this great proposal! I really like the idea. It would definitely help our users navigating the documentation. Let alone the reduced server load when splitting the page into smaller chunks. We're currently working on version 1.4.0, but after that this could be the next big thing to tackle. A few questions:
Anyway, I'm really looking forward to working on this idea! 🙂 |
Beta Was this translation helpful? Give feedback.
-
Thanks falko, good questions. I have some ideas, but they need fleshed out more. When do you expect to release version 1.4? I'll think over the issues you raised, perhaps make an outline of some pages as I envision them, and fill in content to start with. I might even figure out how to do a pull request and put some material in git for you to consider. |
Beta Was this translation helpful? Give feedback.
-
Hey @falkoschindler looks like you're ahead of schedule. I see 1.4.1 was published to pypi Oct 26. 😄 I haven't forgotten about the docs. See my proposed overview section here. I didn't complete it, but did do the first few subsections as a template for the rest. The readme page will guide you through the material. Based on other discussions here and issues I ran into developing my apps, I changed a few subsections to cover topics that beginners run into. In particular, a section on bindings (which is covered late in existing docs) and managing components (not covered explicitly anywhere as far as I can tell). There may be other important concepts I forgot or haven't run into yet. Basically, the overview should give you all the tools and concepts to build a nicegui app. Other sections (existing docs) give details of each element, once you know how to put things together. Adding an FAQ section / page may also help. Some quick answers showing how to do certain things that aren't obvious from the docs. Like how to set colors on buttons. 😄 Hope this helps. Let me know what you think. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Continuing the discussion from #1778 -
Proposal
The nicegui docs are great in many ways, but could use more structure. Something like this, where numbers indicate a tree structure of nested pages):
1.1 Adding Text
1.2 Getting User Input
1.3 Displaying Audiovisual Content
1.4 Displaying Data
1.5 Page Layout
1.6 Styling & Appearance
1.7 Actions & Events
1.8 Configuring and Deploying
2.1 Label
2.2 Headers
2.3 Paragraphs
2.4 Links
2.5 Markdown
2.6 HTML
2.7 Mermaid Diagrams
3.1 Button
3.2 Toggle
3.3 Slider
3.4 ....
4.1 Images
4.1.1 Captions and overlays
4.2 Icons
4.3 Avatars
4.4 Audio
4.5 Video
5.1 Table
5.2 Chart
5.3 Plot
...
You get the idea. With this structure, everything in section 1 would be new pages. Much of it could be borrowed from existing content, like the doc pages or Features section, but simplified. Just barebones concepts and examples to show how nicegui works, without optional args and complications.
The other sections 2 through ... could be pretty much the existing doc pages, with a few tweaks (eg. moving icons and SVG to the audiovisual section). Top level numbered pages like 2. Text Elements could be the existing top-level doc page, but trimmed to just the Text Element items. Preserving the current docs page, but splitting each section into a different page.
The subnumbered pages would be the existing "See more" pages like the button page. These pages could be autogenerated from the code as they are currently. With room for other improvements on them as suggested in #1778.
Advantages
This structure would help in several ways:
Splitting up the current doc page would also help a lot with load times. When I load the doc page it takes several minutes for all the example cards on the right to load and noticeably spins up the fan on my machine. Having fewer items per page (one page for text elements, one page for data elements, etc) should noticeably improve load times and cpu load.
Open issues
Some of the items on existing doc page require some thought for where they fit best in this structure. For instance, Static Files, Media Files, and API Responses all have great info, but it's not clear whether they should be grouped together under Routes (which isn't very descriptive unless you're thinking like a network engineer) or whether they can be moved to other sections (Audiovisual would be a natural home for Media Files).
Auto-context is a fundamental concept that should be surfaced much earlier in the docs. You can't compose complete pages until you know that every element can be nested using
with
. The overview section should discuss this somewhere.Docs could use more discussion of how refreshing works. After reading the docs I still don't have a clear picture of exactly what triggers a refresh of an element and how that refresh happens. I read the Refreshable section. It's entirely possible I missed something elsewhere, but that's kind of my point - it's not easy to find where else refreshing is discussed.
Conclusion
This proposed structure makes the docs easier to understand and navigate. It mostly preserves the existing content with minimal changes (splitting up existing sections into separate pages, reassigning a few elements to different sections), while adding a new overview section to orient users. There are some open details to sort out, but shouldn't require a major overhaul of existing content or how docs are generated. Giving a bit more structure helps organize the material so users can follow it better.
Happy to discuss further if useful. Hope this helps.
Beta Was this translation helpful? Give feedback.
All reactions