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
Docs: improve general methods documentation #386
Comments
Also, I think documentation and maybe good first issue are good labels here. Thanks |
Yes. Definitely! (Probably worth doing per file once they are documented well) |
P.S. I recommend using an LLM (e.g. OpenAI / Llama / Claude) to help make this quicker to implement. Obviously validate the output and don't just accept AI hallucinations as gospel :) Perhaps add some general doc guidelines to this issue or point to some existing ones if you're aware of them.
Also, another way to contribute to the documentation is to improve the examples so they cover each feature a little better. the examples are scraped automatically to provide examples in the docs page (use I've been thinking a bit about how and whether to add images to the doc comments. Like perhaps it would be worth chopping the block example up and putting an image of each part of it directly into the doc comment (this is fairly simple to automate with VHS, but requires a lot of effort to do at scale). |
Hi, I'm interested in fixing this issue. I'd like to start with "Paragraph" but I'm not very sure what needs changing. Could you provide more detail please? It is unchecked in the list above but it doesn't seem to be missing documentation |
Hello, it seems the The main type doc can also be improved by referencing to the different concepts of You can also look here for some guidelines. |
Alright, thank you very much for this. I'll begin documenting Paragraph and move from there |
Some guidelines to consider:
How about writing a concise checklist based on the above links (customized for Ratatui) that helps evaluate whether the docs are complete? |
Alright, I will do this |
Also no need to close #467 - this is fine to add as is with the suggested changes. |
Do you mean something like the above? |
|
This comment was marked as off-topic.
This comment was marked as off-topic.
nvim with rust-analyzer does it automatically for me. For vscode there is a rewrap extension. There are probably similar extension for other editors. |
Is the list of widgets that still need documentation up to date? I was working with various List widgets and Table and would be happy to try to improve those docs |
I wouldn't count on it being so - the latest alpha release docs are available at https://docs.rs/ratatui/0.23.1-alpha.6/ratatui/index.html - feel fee to jump in wherever things are missing or could be better explained. |
I've just checked and it is indeed up to date, those widgets are still missing documentation. |
Problem
There is not enough documentation in the widgets' methods (and other relative elements such as
Title
orPadding
). While most of them are simple and require almost no documentation, some other can be ambiguous.This was a major pain point for me while discovering the library (as a user and as a contributor).
Solution
Add documentation
Alternatives
None
Additional context
I'm totally down to work on it, I just want to advertise this work for users and possibly interested contributors.
Elements missing documentation, grouped by widget :
BarChart
,Bar
(docs(barchart): add documentation toBarChart
#449)Block
,Padding
,BorderType
(docs(Block): add documentation to Block #469)Chart
,Axis
,Dataset
(docs(chart): document chart module #696 )Gauge
(docs(Gauge): add documentation toGauge
#514)List
,ListState
,ListItem
(docs(list): add documentation to the List widget #669)Paragraph
(docs(paragraph): added documentation to the "alignment" method #467)Sparkline
,RenderDirection
(docs(Sparkline): add documentation #648)Table
(docs(table): added documentation for the 'new' method of the 'table' widget #471, chore(table): cleanup docs and builder methods #638)Tabs
(docs(tabs): add documentation toTabs
#535)There are other elements that need documentation, but I think they can be addressed later in an other issue.
Would it be useful to warn (and deny, once completed) on missing doc? See https://doc.rust-lang.org/rustdoc/lints.html#missing_docs
The text was updated successfully, but these errors were encountered: