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
Provide default constraints for M3 bottom sheets #120065
Conversation
@@ -24,6 +24,9 @@ class _${blockName}DefaultsM3 extends BottomSheetThemeData { | |||
|
|||
@override | |||
Color? get surfaceTintColor => ${componentColor("md.comp.sheet.bottom.docked.container.surface-tint-layer")}; | |||
|
|||
@override | |||
BoxConstraints? get constraints => const BoxConstraints(maxWidth: 640.0); |
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.
Should we talk to the Tokens team about tokenizing this, since the value appears in the spec (https://m3.material.io/components/bottom-sheets/specs#3b256f38-c4fd-44e5-ba46-c5858b626ec7)?
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.
We talked last year about it (b/254925602) but all they're considering for now is spacing.
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.
Ideally, everything would be a token!
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
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
This PR constrains M3 bottom sheets to 640dp max width by default.
constraints
can be used to provide differentminWidth
andmaxWidth
.This is not a breaking change per the breaking change policy.
Part of #118619
Part of #111448
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.