-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
border doesn't respect hovered, focused, selected states
#161942
base: master
Are you sure you want to change the base?
Fix SegmentedButton
border doesn't respect hovered, focused, selected states
#161942
Conversation
SegmentedButton
border doesn't respect hovered, focused stateSegmentedButton
border doesn't respect hovered, focused, selected states
97133ad
to
5f4a194
Compare
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.
Based on the specs, it seems if a segment is disabled, we should be able to show the disabled state on border of the specific segment (not the whole SegmentedButton). So It's not clear what expected behavior would be when a specific segment is hovered, focused and pressed. Let me double check with the material team.
Filed a bug and asked for clarification: b/394478041 |
bbb0745
to
4ff767b
Compare
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.
I haven't heard about the update from the material team, but I do see there's a token to indicate the outline of the whole segmented button, so I think this feature makes sense:)
Sorry for the late response. Trying my best to speed up! I'll make sure we make some progress this week!
f0ce435
to
6825b07
Compare
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! Thanks so much for your patience.
6825b07
to
74e10d3
Compare
@victorsanni Could you please approve? :) |
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
autosubmit label was removed for flutter/flutter/161942, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
I was looking at the google testing failures, they are all image diffs. Seems like the disabled segmented button is now black instead of gray. I wasn't following the earlier conversation, but is that intended? |
I'll look at the internal use case to see how they use the segmented buttons. I think we handle the disabled state correctly here🤔 |
Fixes
SegmentedButton
does not set its MaterialState for sideCode Sample
expand to view the code sample
Before
Screen.Recording.2025-01-21.at.15.23.24.mov
After
Screen.Recording.2025-01-21.at.15.22.33.mov
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.