Skip to content

Conversation

@TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Apr 14, 2022

Updates ListTile [TextTheme] text style references to the Material 3 style names.

Fixes #102075

Part of: #91605 (fixes #89853)

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 14, 2022
@TahaTesser TahaTesser requested a review from HansMuller April 14, 2022 10:55
@HansMuller HansMuller changed the title Migrate ListTile to Material 3 Migrate ListTile TextTheme TextStyle references to Material 3 Apr 14, 2022
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the title of this PR to narrow its scope. In a separate PR we could change the defaults for the ListTile.iconColor - when ThemeData.useMaterial3 = true - to match the Material 3 spec. That means that the default would be based on the theme's color scheme, not IconTheme. We're not trying to simplify making all of the icons in an app have the same color, but we don't want the defaults to be correct for each component type, per the spec.

@TahaTesser TahaTesser force-pushed the M3_tile_icon_color_text branch from b9ba2c9 to 3c44cc7 Compare April 18, 2022 09:51
@TahaTesser TahaTesser force-pushed the M3_tile_icon_color_text branch from 3c44cc7 to 3866272 Compare April 18, 2022 09:56
@TahaTesser TahaTesser requested a review from HansMuller April 18, 2022 12:32
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HansMuller HansMuller merged commit 9f0bcfb into flutter:master Apr 18, 2022
@TahaTesser TahaTesser deleted the M3_tile_icon_color_text branch April 18, 2022 16:58
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 18, 2022
@HansMuller
Copy link
Contributor

This caused some internal test failures (Google internal link b/229707952). Most of them seem inconsequential, but there were a few cases where the a font became noticeably smaller. I'm going to revert this until we can track down the source of those failures (maybe a conditional useMaterial3 is needed somewhere).

@QuncCccccc

@TahaTesser
Copy link
Member Author

@HansMuller @QuncCccccc

I think this is caused by this line:

https://github.com/flutter/flutter/pull/101900/files#diff-c4ef7c798c820ecda6cab38be1c2d619d5349dc478889f3a54ebbe07f60c11f2L657

Earlier today I was looking into this new issue #102121 and I realized bodyText1 -> bodyLarge not bodyMedium. (which is in this PR)

/// Used for emphasizing text that would otherwise be [bodyText2].
TextStyle? get bodyText1 => bodyLarge;
/// The default text style for [Material].
TextStyle? get bodyText2 => bodyMedium;

@TahaTesser
Copy link
Member Author

TahaTesser commented Apr 19, 2022

After revert is completed, I can file reland PR to match the proper font, which is bodyLarge but I am also concerned about #102121, since it looks like spacing is incorrect in this newly added M3 font,

https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/typography.dart#L613-L614

@TahaTesser
Copy link
Member Author

(maybe a conditional useMaterial3 is needed somewhere).

This sounds great until we're sure M3 fonts are working as expected.

@TahaTesser
Copy link
Member Author

TahaTesser commented Apr 19, 2022

While relanding, I can see bodyLarge size is bigger than bodyText1 so reland is still using bodyMedium.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 21, 2022
egramond pushed a commit to egramond/flutter that referenced this pull request May 5, 2022
@Gabriel2048
Copy link

Was there a way to disable the default InkWell/ Splash behavior considered?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate ListTile TextTheme TextStyle references to Material 3 ☂️ Update TextTheme to use new Material 3 text styles

3 participants