-
Notifications
You must be signed in to change notification settings - Fork 29.7k
FIX: SegmentedButton segments background cannot be made transparent #123293
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: SegmentedButton segments background cannot be made transparent #123293
Conversation
|
@esouthren and @HansMuller, as prior art reference, the use-case and rationale for this is equivalent to the M3 mode of
As stated in the issue, the M3 spec says background color of unselected segments is transparent. It is admittedly a bit vague about doing that. The illustrations show them as such, and it specifically only mentions background color of selected segments. Current implementation of the By letting it use transparent Making unselected segment buttons fully opaque is still possible by just giving them a color. With this FIX you can also create designs that uses segments in |
esouthren
left a comment
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.
LGTM, thank you for the comprehensive writeup and fix!
TahaTesser
left a comment
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.
LGTM! (second review to land this)
|
@rydmike |
|
I've updated the PR, hopefully that will fix the Google Testing "your PR is out of date" problem |
|
auto label is removed for flutter/flutter, pr: 123293, due to - The status or check suite Linux_android android_defines_test has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
Sorry, 1 am here, was not online, even though I often am at this time :) |
|
I took a gamble and just restarted Linux_android android_defines_test, since it didn't appear to have anything to do with this PR. |
|
The failing customer test is https://github.com/macosui/macos_ui/blob/dev/test/selectors/date_picker_test.dart#L292: |
|
auto label is removed for flutter/flutter, pr: 123293, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
There are a small number of internal golden image test failures (internal google link cl/520561370) The change looks OK to me (the button backgrounds are supposed to be transparent). @esouthren do the diffs look OK to you? |
|
The shown images are as can be seen different. The expected one has a bit of background color and actual one does not, since it is transparent. This would be the case if some color was used on SegmentedButton's underlying canvas Material by default in the expected golden result. |
LGTM, thanks |
|
@XilaiZhang - this PR is being held up by the same issue as #123294: #123294 (comment). What do we need to do to see the Google Testing results? |
|
temp workaround: the test failures are at test/521658605 and the cl is cl/521658605 Thanks for reporting the issue! will keep track of it in b/260764527 |


FIX: SegmentedButton segments background cannot be made transparent
BEFORE
AFTER
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.