Skip to content
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

Add inherit: false to material2018 text geometry text themes #110870

Conversation

LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented Sep 2, 2022

Fixes #103864

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 Sep 2, 2022
@LongCatIsLooong LongCatIsLooong force-pushed the text-geometry-text-themes-inherit-to-false branch from b49d599 to b435475 Compare September 2, 2022 22:52
@LongCatIsLooong LongCatIsLooong force-pushed the text-geometry-text-themes-inherit-to-false branch from b435475 to 50f2474 Compare September 2, 2022 22:56
@LongCatIsLooong LongCatIsLooong marked this pull request as ready for review September 2, 2022 22:56
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 don't recall why the 2018 text styles didn't specify inherit: false in the first place. Perhaps we'll never know. Or maybe it was just an oversight.

@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 2, 2022
@auto-submit auto-submit bot merged commit a87540b into flutter:master Sep 3, 2022
@rydmike
Copy link
Contributor

rydmike commented Sep 3, 2022

Nice this is awesome and a surprisingly simple fix. I had no idea it was allowed to change the framework to set it to false. 😃

Thanks @LongCatIsLooong, many others have reported this issue too and it has been open a long time. We should close the duplicates/related issues too, if not done already (automatically?). I think most of them are referenced in comments to my issue report.

I made a slightly tedious workaround in Themes Playground to get around this issue. I needed a workaround since the app needs to be able to dynamically switch between 2018 and 2021 Typography, or at least make it looks like it does so. So I made it stay in 2021 all the time, and simulate switching, by instead changing to an internal TextTheme in 2021 Typography, that looks like it is using 2018 Typography. The app's code gen output still gives a setup for the actual 2018 Typography, when that is selected. While it worked, and users don't see and know it is going on, I will be happy to remove its extra code once this lands in stable.

Love your honest comment @HansMuller, I would not expect either that it would be possible to know and remember historic rationale for everything in the framework, it is pretty darn big. Sure oversights might happen too... naah not really in Flutter framework, the people working on it are just too awesome 😃💙

@LongCatIsLooong LongCatIsLooong deleted the text-geometry-text-themes-inherit-to-false branch September 3, 2022 02:26
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 3, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 3, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 3, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 4, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 4, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 4, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 4, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 6, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App 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.

Dynamically changing Typography in ThemeData generates an error
3 participants