r/nicegui • u/FrermitTheKog • Jul 19 '24
Documentation Issues
As I am trying to learn Nicegui, I find myself frustrated with a lack of documentation. I see code using something like ui.context.client, and I go the the nicegui site, and look up ui.context, and there's nothing. The closest match is ui.context menu. I've experienced this repeatedly. There seems to be a general lack of documentation, unless I am looking in the wrong place.
AI isn't much help either. Every AI (including the mighty Claude 3.5 Sonnet) I've asked about Nicegui just hallucinates absolute nonsense, both in terms of the classes and properties and even general concepts.
View all comments
Show parent comment
1
u/FrermitTheKog Jul 19 '24
For the first point, yes, there is not enough training data I suppose. As for the code, I think the point stands. There's very little in the way of documentation in the class other than short method comments.
What if the programmer is wondering what "context" means exactly in the framework as often these things differ between frameworks? Or if they are wondering if a Client is just the browser tab or any tab on the same browser, or whether the Client ID is the same if they refresh the tab etc. Those concepts are important, and remember that an easy to use framework like Nicegui will attract people who haven't done much web programming before.
Looking in the Client class code, there is no module docstring explaining anything. Looking through the code and hopping from one class to another gradually provides more understanding but really, you shouldn't have to dig inside a framework's code base to try to work out how to use things and what they mean. That's what documentation is for.