-
Notifications
You must be signed in to change notification settings - Fork 455
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
Fix issues with *Button
s
#3582
Fix issues with *Button
s
#3582
Conversation
Reviewer's Guide by SourceryThis pull request addresses issues with various button components by adding new properties, refactoring existing methods, and ensuring compatibility with both 'ThemeVisualDensity' and 'VisualDensity' enums. Key changes include updates to button style parsing, handling of disabled states, and assertions for minimum content requirements. File-Level Changes
Tips
|
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.
Hey @ndonkoHenri - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
if any([self.__color, self.__bgcolor, self.__elevation]): | ||
self.__style = self.__style or ButtonStyle() | ||
if self.__style: | ||
self.__style.color = ( |
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.
issue (code-quality): Extract code out into method (extract-method
)
* BorderSide: add stroke_align prop * proper styling in buttons * deprecate ThemeVisualDensity in favor of VisualDensity * ButtonStyle: new props * deprecation: disabled_color is renamed to disabled_bgcolor
Fixes #3573
ThemeVisualDensity
in favor ofVisualDensity
Summary by Sourcery
This pull request addresses multiple issues with button components by adding new style properties, fixing color and elevation handling when disabled, and refactoring code for better readability and consistency. It also introduces new enums for visual density settings and ensures proper handling of deprecated enums.