-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
chore: add documentation guidelines #447
Conversation
Codecov Report
@@ Coverage Diff @@
## main #447 +/- ##
==========================================
- Coverage 90.42% 90.03% -0.40%
==========================================
Files 40 40
Lines 11081 11127 +46
==========================================
- Hits 10020 10018 -2
- Misses 1061 1109 +48 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this.
A couple of suggested extra guidelines for your consideration:
- generally hide imports and use the prelude / wildcard imports to keep things concise. E.g.:
/// # use ratatui::{prelude::*, widgets::*};
- generally use syles expressed using the
Stylize
trait shortcuts instead of the more verbose styles. E.g.:
let style = Style::new().red().bold();
// not
let style = Style::default().fg(Color::Red).add_modifier(Modifiers::BOLD);
See comments at #448 for some more discussion about discoverability of docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be nice to have this in.
Could you please also add a mention that ratatui tends to attract beginner rust users and that that should be kept in mind when writing documentation for it.
8db62b6
to
c74f918
Compare
I think I addressed most of what you said in c74f918. Let me know if there are anything else. |
Changes LGTM |
c74f918
to
3cec62e
Compare
Thanks for the PR @Valentin271 ! |
This PR adds general guidelines on how to write documentation for Ratatui.
I based the guidelines off of #386 and #443.