Increase material button minimum tap target height to 48dp#18048
Increase material button minimum tap target height to 48dp#18048jonahwilliams wants to merge 7 commits into
Conversation
| splashColor: _getSplashColor(theme, buttonTheme), | ||
| elevation: 0.0, | ||
| highlightElevation: 0.0, | ||
| outerPadding: const EdgeInsets.only(top: 6.0, bottom: 6.0), |
There was a problem hiding this comment.
Should this only be added if the button itself is sized too small or always?
There was a problem hiding this comment.
Good point - the spec isn't very clear but only claims a minimum touch target size of 48x48. I updated outer padding to constraints so we can express this
|
Updating the FlatButton broke some tests for both the snackbar and the time picker. In the time pickers case, the extra space consumed by the buttons shrinks the clock on the time picker. Not sure whether the best approach would be to increase the overall size so that the clock doesn't change shapes or just update all of the tests |
|
Anything where this changed the layout you probably want to adjust so that the resulting layout is left unchanged. If this changes the layout anywhere, please make sure to follow the breaking change protocol and also make sure to do a google3 roll immediately after landing this to handle any google3 breakage. |
|
Since this is a major breaking change I will follow up in a week or so |
|
There are two problematic tests which I need to do more investigation into before submitting |
|
Something which might make this change easier is to expose the outer padding to each material button class to allow setting it to null, removing the padding. We could default to null for a release so people could have time to fix their code the switch as another breaking change. Similar issues for chips and other tap targets. |
|
I think we're better off just making the breaking change and moving on, having multiple staged rollouts is confusing and logistically challenging. |
|
Closing in favor of #18369 |
Increases the minimum tap target height for all material buttons to 48dp using an additional set of outer constraints.
Also adjusts the height of the TimePicker by 12dp and the minimum size of a Snackbar with an action to 48dp.
Fixes #615