Skip to content

[material_ui] Migrate M3 Time Picker template to use new gen_defaults - #13164

Merged
auto-submit[bot] merged 7 commits into
flutter:mainfrom
ValentinVignal:material-ui/Move-time-picker-template-out-of-temporarily-excluded
Nov 3, 2026
Merged

auto-submit[bot] merged 7 commits into
flutter:mainfrom
ValentinVignal:material-ui/Move-time-picker-template-out-of-temporarily-excluded

Conversation

@ValentinVignal

Copy link
Copy Markdown
Contributor

Work toward flutter/flutter#187899.
Fixes flutter/flutter#188439

Pre-Review Checklist

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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 8, 2026
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Oct 8, 2026
@ValentinVignal

Copy link
Copy Markdown
Contributor Author

Like the other PRs migrating to use the new gen_defaults, this doesn't require a version and changelog

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the Material 3 TimePicker defaults generation to the token-based template system. It extracts the _TimePickerDefaultsM3 class from time_picker.dart into a generated file, updates time_picker_template.dart to utilize TokenTimePicker tokens, enables the generator script, and adds corresponding tests. There are no review comments, so I have no feedback to provide.

@ValentinVignal
ValentinVignal force-pushed the material-ui/Move-time-picker-template-out-of-temporarily-excluded branch from f8d3ee6 to d4a7d48 Compare October 14, 2026 08:25
@QuncCccccc QuncCccccc added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Oct 15, 2026
@QuncCccccc
QuncCccccc force-pushed the material-ui/Move-time-picker-template-out-of-temporarily-excluded branch from d4a7d48 to 03cef86 Compare October 15, 2026 22:37
@ValentinVignal
ValentinVignal force-pushed the material-ui/Move-time-picker-template-out-of-temporarily-excluded branch from 03cef86 to 0c2d00e Compare October 21, 2026 18:22
@QuncCccccc
QuncCccccc self-requested a review October 21, 2026 19:15
Comment on lines 10 to 15
@@ -20,10 +15,16 @@ class TimePickerTemplate extends TokenTemplate {
static const String variant = '';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These are unused anymore. Let's remove them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +54 to +55
// import '../templates/time_picker_template.dart';
import '../templates/time_picker_template.dart';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These 2 lines are duplicated. Please remove one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops, sorry about that, fixed in Remove commented duplicated import

@ValentinVignal
ValentinVignal force-pushed the material-ui/Move-time-picker-template-out-of-temporarily-excluded branch from 0c2d00e to c9c06f2 Compare October 28, 2026 07:03

@QuncCccccc QuncCccccc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM with just one more comment! Thanks a lot!

@override
double get elevation {
return ${elevation("$tokenGroup.container")};
return ${number(TokenTimePicker.containerElevation)};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need to wrap numeric tokens in number(...) — interpolating ${TokenTimePicker.containerElevation} directly produces the exact same output and can make code simpler and cleaner (same for the other number(...) calls in this file).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure! I removed it in Remove usages or number

@ValentinVignal
ValentinVignal force-pushed the material-ui/Move-time-picker-template-out-of-temporarily-excluded branch from c9c06f2 to aacbfe0 Compare November 3, 2026 08:11
@QuncCccccc
QuncCccccc requested a review from elliette November 3, 2026 17:30
@elliette elliette added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 3, 2026
@auto-submit
auto-submit Bot merged commit 140b51f into flutter:main Nov 3, 2026
13 checks passed
jpohhhh pushed a commit to Telosnex/flutter that referenced this pull request Nov 4, 2026
flutter/packages@1df8447...670b30e

2026-11-04 [email protected] [material_ui]
Inherit `IconButtonThemeData.variant` from enclosing themes
(flutter/packages#13263)
2026-11-04 [email protected] [tool] Regenerate `MockGitDir` for
`package:git` 2.5.0 (flutter/packages#13544)
2026-11-03 [email protected] [material_ui] Fix discrete Slider
selecting the neighboring tick near the track ends
(flutter/packages#12927)
2026-11-03 [email protected]
[material_ui] Migrate M3 Time Picker template to use new gen_defaults
(flutter/packages#13164)
2026-11-03 [email protected]
[camera_android_camerax] Update skills_lint to 0.5.3
(flutter/packages#13530)
2026-11-03 [email protected] Roll Flutter from
fcfb4f2 to 9347202 (38 revisions) (flutter/packages#13540)

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

To file a bug in Flutter:
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
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 CICD Run CI/CD override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

time_picker_template.dart

3 participants