Skip to content
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

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

Valentin271
Copy link
Member

This PR adds general guidelines on how to write documentation for Ratatui.

I based the guidelines off of #386 and #443.

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #447 (3cec62e) into main (14eb6b6) will decrease coverage by 0.40%.
Report is 7 commits behind head on main.
The diff coverage is n/a.

@@            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     

see 8 files with indirect coverage changes

Copy link
Member

@joshka joshka left a 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);

CONTRIBUTING.md Outdated Show resolved Hide resolved
@joshka
Copy link
Member

joshka commented Aug 28, 2023

See comments at #448 for some more discussion about discoverability of docs.

Copy link
Member

@mindoodoo mindoodoo left a 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.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@Valentin271 Valentin271 force-pushed the chore/doc-contributing branch from 8db62b6 to c74f918 Compare August 29, 2023 20:33
@Valentin271
Copy link
Member Author

Valentin271 commented Aug 29, 2023

I think I addressed most of what you said in c74f918. Let me know if there are anything else.

@joshka
Copy link
Member

joshka commented Aug 29, 2023

Changes LGTM

@Valentin271 Valentin271 force-pushed the chore/doc-contributing branch from c74f918 to 3cec62e Compare August 29, 2023 20:48
@joshka joshka enabled auto-merge August 29, 2023 20:56
@joshka joshka dismissed mindoodoo’s stale review August 29, 2023 20:57

changes were made

@joshka joshka added this pull request to the merge queue Aug 29, 2023
Merged via the queue into ratatui:main with commit 28c6157 Aug 29, 2023
@joshka
Copy link
Member

joshka commented Aug 29, 2023

Thanks for the PR @Valentin271 !

@Valentin271 Valentin271 deleted the chore/doc-contributing branch August 29, 2023 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants