-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
feat: Make Stylize's .bg(color)
generic
#1099
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1099 +/- ##
=====================================
Coverage 94.2% 94.2%
=====================================
Files 61 61
Lines 14530 14530
=====================================
Hits 13693 13693
Misses 837 837 ☔ View full report in Codecov by Sentry. |
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.
Does this need any updated tests?
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.
As every impl needs to change this is a breaking change
There weren't any tests for this. I think there's no implementations for
This is strictly breaking but in practice I don't think it'll break code because Open to suggestions on making this protected. |
No hard opinion on this, but I know that I hate seeing traits in other libs that I'd like to be able to implement even if they later change them in the lib, but can't because they're not exposed, so I'd lean towards just keeping it as is, and dealing with breaking changes in the usual manners (communicating when we can, being mindful of the changes, etc.) |
@@ -47,6 +49,14 @@ This is a quick summary of the sections below: | |||
- MSRV is now 1.63.0 | |||
- `List` no longer ignores empty strings | |||
|
|||
## [v0.26.1](https://github.com/ratatui-org/ratatui/releases/tag/v0.26.1) |
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.
Is this the correct version for this - likely 'unreleased' or 0.26.3
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.
Ugh my bad.
Also - 0.26.3 was slated to be a bugfix / no breaking changes release tomorrow, to make it easy for broken apps to just be fixed without any changes required. (version spec 0.26.2 will actually use 0.26.3 automatically when resolving, but it won't use 0.27.0) |
Should I revert this PR until 0.27.0? |
This PR makes `.bg(color)` generic accepting anything that can be converted into `Color`; similar to the `.fg(color)` method on the same trait
This reverts commit ec763af from ratatui#1099
This PR makes `.bg(color)` generic accepting anything that can be converted into `Color`; similar to the `.fg(color)` method on the same trait
This reverts commit ec763af from ratatui#1099
This PR makes
.bg(color)
generic accepting anything that can be converted intoColor
; similar to the.fg(color)
method on the same trait