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

docs(lib): extract feature documentation from Cargo.toml #438

Merged
merged 3 commits into from
Aug 27, 2023

Conversation

orhun
Copy link
Member

@orhun orhun commented Aug 26, 2023

Utilize document-features crate to extract the feature documentation from Cargo.toml

before / after:

Screenshot 2023-08-26 at 14-32-26 ratatui - Rust

One thing to note, we can possibly make it an optional dependency: slint-ui/document-features#8

Let me know what you think 🐻

@codecov
Copy link

codecov bot commented Aug 26, 2023

Codecov Report

Merging #438 (8bc8d5c) into main (b35f19e) will increase coverage by 0.39%.
Report is 2 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #438      +/-   ##
==========================================
+ Coverage   89.95%   90.34%   +0.39%     
==========================================
  Files          40       40              
  Lines       10878    10977      +99     
==========================================
+ Hits         9785     9917     +132     
+ Misses       1093     1060      -33     

see 2 files with indirect coverage changes

Copy link
Member

@Valentin271 Valentin271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saw this crate recently too. I think its a great idea, its easier to maintain like so.

As for making document-feature an optional dependency, I think it's better because users don't need to build it every time.
That would lead to a feature named document-feature which makes sense to me.
Other crates are using this pattern too like egui.

As the number of crates using document-feature grows (only 138 right now), I think people will get used to having this feature and will instinctly know what it is, like serde.

Cargo.toml Show resolved Hide resolved
@orhun
Copy link
Member Author

orhun commented Aug 26, 2023

Made the dependency optional in 78363c5

@joshka
Copy link
Member

joshka commented Aug 26, 2023

The https://lib.rs changes for showing features is neat too:
https://users.rust-lang.org/t/new-features-on-lib-rs-website/98560

@orhun orhun requested a review from Valentin271 August 27, 2023 08:31
@joshka joshka added this pull request to the merge queue Aug 27, 2023
Merged via the queue into ratatui:main with commit 8b36683 Aug 27, 2023
@joshka joshka added this to the v0.23.0 milestone Aug 27, 2023
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