Skip to content

Conversation

@QuncCccccc
Copy link
Contributor

@QuncCccccc QuncCccccc commented Aug 12, 2024

Following #151914, this PR is to normalize ThemeData.cardTheme; change the CardTheme cardTheme property to CardThemeData cardTheme in ThemeData. In ThemeData() and ThemeData.copyWith(), the cardTheme parameter type is changed to Object? to accept both CardTheme and CardThemeData so that we won't cause immediate breaking change and make sure rolling is smooth. Once all component themes are normalized, these Object? types should be changed to xxxThemeData.

There's no way to create a dart fix because we can't add a "@deprecated" label for CardTheme because CardTheme is a new InheritedWidget subclass now.

Addresses the "theme normalization" sub project within #91772

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].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Aug 12, 2024
@QuncCccccc QuncCccccc marked this pull request as ready for review August 13, 2024 00:57
Copy link
Member

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

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

LGTM!

@QuncCccccc
Copy link
Contributor Author

Will wait until rest of the component themes(DialogTheme, InputDecorationTheme and TabBarTheme) have fixes ready to merge because I think it might be better to include them together in one breaking change migration.

Copy link
Member

@guidezpl guidezpl left a comment

Choose a reason for hiding this comment

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

Nice!

@Piinks Piinks marked this pull request as draft August 14, 2024 18:22
Copy link
Contributor

@bleroux bleroux left a comment

Choose a reason for hiding this comment

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

While reading for learning purpose, I spotted some typos.

@QuncCccccc
Copy link
Contributor Author

While reading for learning purpose, I spotted some typos.

Thanks a lot for the suggestions:) Just updated!

ButtonThemeData? buttonTheme,
CardTheme? cardTheme,
// TODO(QuncCccccc): Change the parameter type to CardThemeData
Object? cardTheme,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Similar to #155129, to help smooth rolling into G3, I updated the parameter type in ThemeData() and ThemeData.copyWith() to object? and added a TODO to change the parameter type back to CardThemeData.

@QuncCccccc QuncCccccc marked this pull request as ready for review October 1, 2024 22:26
Copy link
Member

@guidezpl guidezpl left a comment

Choose a reason for hiding this comment

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

  _    ___ _____ __  __ 
 | |  / __|_   _|  \/  |
 | |_| (_ | | | | |\/| |
 |____\___| |_| |_|  |_|
                        

@QuncCccccc QuncCccccc force-pushed the update_card_theme_type branch 2 times, most recently from 5dcd337 to b5ea6e4 Compare October 3, 2024 02:01
@QuncCccccc QuncCccccc force-pushed the update_card_theme_type branch from b5ea6e4 to 3cf69f6 Compare October 3, 2024 19:29
@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 4, 2024
@auto-submit auto-submit bot merged commit 534adfb into flutter:master Oct 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 6, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 6, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 8, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 8, 2024
Manual roll requested by [email protected]

flutter/flutter@ec2e12b...0917e9d

2024-10-05 [email protected] Roll Flutter Engine from 2068577e510b to 01de9dcf6bbf (1 revision) (flutter/flutter#156274)
2024-10-05 [email protected] Roll Flutter Engine from 6d6bc39fe8b1 to 2068577e510b (1 revision) (flutter/flutter#156267)
2024-10-05 [email protected] Roll Flutter Engine from 92b5b318190b to 6d6bc39fe8b1 (4 revisions) (flutter/flutter#156266)
2024-10-05 [email protected] Roll Flutter Engine from fd6082ab6693 to 92b5b318190b (1 revision) (flutter/flutter#156261)
2024-10-05 [email protected] Roll Flutter Engine from bc5f9fc80b06 to fd6082ab6693 (4 revisions) (flutter/flutter#156258)
2024-10-04 [email protected] Roll Flutter Engine from eece6c3ec63a to bc5f9fc80b06 (2 revisions) (flutter/flutter#156252)
2024-10-04 [email protected] Roll pub packages (flutter/flutter#156254)
2024-10-04 [email protected] Roll Flutter Engine from 9fa363bdde20 to eece6c3ec63a (1 revision) (flutter/flutter#156250)
2024-10-04 [email protected] Roll Flutter Engine from d38f5e560a98 to 9fa363bdde20 (1 revision) (flutter/flutter#156249)
2024-10-04 [email protected] remove bringup from Windows tool_integration_tests_* (flutter/flutter#156179)
2024-10-04 [email protected] Roll Flutter Engine from 205484009711 to d38f5e560a98 (4 revisions) (flutter/flutter#156239)
2024-10-04 [email protected] Normalize `ThemeData.cardTheme` (flutter/flutter#153254)
2024-10-04 [email protected] Roll Packages from 429650f to 05bf1d4 (5 revisions) (flutter/flutter#156225)
2024-10-04 [email protected] Roll Flutter Engine from e0109f0fd5b2 to 205484009711 (1 revision) (flutter/flutter#156216)
2024-10-04 [email protected] Roll pub packages (flutter/flutter#156215)
2024-10-04 [email protected] Roll Flutter Engine from c2a9fb051bd0 to e0109f0fd5b2 (1 revision) (flutter/flutter#156213)
2024-10-04 [email protected] Roll Flutter Engine from 66d397dff87a to c2a9fb051bd0 (5 revisions) (flutter/flutter#156206)
2024-10-04 [email protected] Roll Flutter Engine from 20369c5d2b93 to 66d397dff87a (5 revisions) (flutter/flutter#156188)
2024-10-03 [email protected] Roll Flutter Engine from de1762dbc5cc to 20369c5d2b93 (7 revisions) (flutter/flutter#156174)
2024-10-03 [email protected] Refactor devfs_web_ddc_modules_test.dart (flutter/flutter#155609)
2024-10-03 [email protected] Allow arrow keys to navigate `MenuAnchor` independently of global shortcut definition (flutter/flutter#155728)
2024-10-03 [email protected] Inherited Theme: zero rebuilds (flutter/flutter#155699)
2024-10-03 [email protected] Roll Flutter Engine from 247bc68c578e to de1762dbc5cc (4 revisions) (flutter/flutter#156160)
2024-10-03 [email protected] Roll pub packages (flutter/flutter#156159)
2024-10-03 [email protected] pattern-matching refactor (flutter/flutter#154753)
2024-10-03 [email protected] Add autocorrect and enableSuggestions to SearchDelegate (flutter/flutter#154932)
2024-10-03 [email protected] Roll Packages from 7c97c88 to 429650f (6 revisions) (flutter/flutter#156155)
2024-10-03 [email protected] Move some tools test ownership to Ben (flutter/flutter#156123)
2024-10-03 [email protected] further shard the Windows tool_integration_tests* targets (flutter/flutter#156121)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
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.

4 participants