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(color): parse more color formats and add docs #306

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

joshka
Copy link
Member

@joshka joshka commented Jul 10, 2023

Fixes #305

@joshka
Copy link
Member Author

joshka commented Jul 10, 2023

Doc Preview:

image

...

image

...

image

...

image

...

image

@orhun
Copy link
Sponsor Member

orhun commented Jul 10, 2023

Have you considered adding test cases for the invalid color formats as well?

src/style.rs Show resolved Hide resolved
@joshka
Copy link
Member Author

joshka commented Jul 10, 2023

@orhun there are existing tests for the invalid formats - am I misunderstanding what you're asking for here?

https://github.com/joshka/ratatui/blob/f100d222c962de59c23ee964be4cfe78c601d2d3/src/style.rs#L578-L593

@orhun
Copy link
Sponsor Member

orhun commented Jul 11, 2023

Everything is okay as far as we cover these changes I think:

https://github.com/joshka/ratatui/blob/f100d222c962de59c23ee964be4cfe78c601d2d3/src/style.rs#L421-L430

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #306 (916744e) into main (804115a) will increase coverage by 0.10%.
The diff coverage is 98.85%.

@@            Coverage Diff             @@
##             main     #306      +/-   ##
==========================================
+ Coverage   83.11%   83.21%   +0.10%     
==========================================
  Files          37       37              
  Lines        7717     7764      +47     
==========================================
+ Hits         6414     6461      +47     
  Misses       1303     1303              
Impacted Files Coverage Δ
src/style.rs 88.92% <98.85%> (+2.07%) ⬆️

@joshka
Copy link
Member Author

joshka commented Jul 12, 2023

Force push updates the tests to cover more happy paths and a few useful error paths, and moves the aliases out of the match into the replacements only.

@orhun orhun added this pull request to the merge queue Jul 12, 2023
Merged via the queue into ratatui-org:main with commit e66d5cd Jul 12, 2023
17 checks passed
a-kenji pushed a commit to a-kenji/ratatui that referenced this pull request Jul 16, 2023
@joshka joshka deleted the docs-colors branch August 20, 2023 05:59
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.

Support hyphenated colour names in Color::from_str
3 participants