Skip to content

[material_ui] Update M3E data tokens to version 38.0.1#11963

Open
elliette wants to merge 4 commits into
flutter:m3e_migrationfrom
elliette:m3e_migration_token_update
Open

[material_ui] Update M3E data tokens to version 38.0.1#11963
elliette wants to merge 4 commits into
flutter:m3e_migrationfrom
elliette:m3e_migration_token_update

Conversation

@elliette

@elliette elliette commented Jun 23, 2026

Copy link
Copy Markdown
Member

Work towards flutter/flutter#187899

Pre-Review Checklist

Test exemption: All code is generated through automating roll process.

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

QuncCccccc and others added 4 commits June 15, 2026 15:23
part of flutter/flutter#184950

## Pre-Review Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran [the
auto-formatter].
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [ ] I followed [the version and CHANGELOG instructions], using
[semantic versioning] and the [repository CHANGELOG style], or I have
commented below to indicate which documented exception this PR falls
under[^1].
- [x] I updated/added any relevant documentation (doc comments with
`///`).
- [ ] I added new tests to check the change I am making, or I have
commented below to indicate which [test exemption] this PR falls
under[^1].
- [ ] All existing and new tests are passing.

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](https://developers.google.com/gemini-code-assist/docs/review-github-code).
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.

[^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.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[the auto-formatter]:
https://github.com/flutter/packages/blob/main/script/tool/README.md#format-code
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[the version and CHANGELOG instructions]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version-and-changelog-updates
[semantic versioning]:
https://dart.dev/tools/pub/versioning#semantic-versions
[repository CHANGELOG style]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[test exemption]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests

Co-authored-by: Flutter Material Tokens Copybara Bot <flutter-material-tokens-copybara@google.com>
Work towards flutter/flutter#186906

Adds the initial `gen_defaults` sub-directory with the initial
`TokenTemplate` and generator. This is simply the initial scaffold, we
will need to add additional helper functions as necessary as we begin
adding the actual templates.

## Pre-Review Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran [the
auto-formatter].
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I followed [the version and CHANGELOG instructions], using
[semantic versioning] and the [repository CHANGELOG style], or I have
commented below to indicate which documented exception this PR falls
under[^1].
- [x] I updated/added any relevant documentation (doc comments with
`///`).
- [x] I added new tests to check the change I am making, or I have
commented below to indicate which [test exemption] this PR falls
under[^1].
- [ ] All existing and new tests are passing.

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](https://developers.google.com/gemini-code-assist/docs/review-github-code).
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.

[^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.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[the auto-formatter]:
https://github.com/flutter/packages/blob/main/script/tool/README.md#format-code
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[the version and CHANGELOG instructions]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version-and-changelog-updates
[semantic versioning]:
https://dart.dev/tools/pub/versioning#semantic-versions
[repository CHANGELOG style]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[test exemption]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests
Work towards flutter/flutter#186906
Work towards flutter/flutter#187899

Previously, the `gen_defaults` script generated the files in different
directories based on whether or not the template was an M3 or M3E
template. Since we are planning on using an variant enum instead of
different libraries to separate M3 and M3E implementations, the
`gen_defaults` script needs to be accordingly updated.

**Before:**

```
lib/src/
├── button.dart                      ← Editable M3 parent file
├── material_3_expressive/
│   └── button.dart                  ← Editable M3E parent file
└── generated/
    ├── button_defaults.g.dart       ← Generated M3 part file
    └── material_3_expressive/
        └── button_defaults.g.dart   ← Generated M3E part file
```

**After:**

```
lib/src/
├── button.dart                              ← Editable M3/M3E parent file
└── generated/
    ├── button_m3_defaults.g.dart            ← Generated M3 part file
    └── button_m3e_defaults.g.dart           ← Generated M3E part file
```


The template now creates the generated class name as well, either
`M3NameDefaults` or `M3ENameDefaults` (e.g. `M3EButtonDefaults`).


## Pre-Review Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran [the
auto-formatter].
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I followed [the version and CHANGELOG instructions], using
[semantic versioning] and the [repository CHANGELOG style], or I have
commented below to indicate which documented exception this PR falls
under[^1].
- [x] I updated/added any relevant documentation (doc comments with
`///`).
- [x] I added new tests to check the change I am making, or I have
commented below to indicate which [test exemption] this PR falls
under[^1].
- [ ] All existing and new tests are passing.


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](https://developers.google.com/gemini-code-assist/docs/review-github-code).
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.

[^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.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[the auto-formatter]:
https://github.com/flutter/packages/blob/main/script/tool/README.md#format-code
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[the version and CHANGELOG instructions]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version-and-changelog-updates
[semantic versioning]:
https://dart.dev/tools/pub/versioning#semantic-versions
[repository CHANGELOG style]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[test exemption]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests
FolderOrigin-RevId: /google/src/cloud/elliottbrooks/copybara-m3e-tokens/google3/javascript/materialdesign/tokens/compiler/formats/flutter/staging_output
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 23, 2026
@elliette elliette requested a review from QuncCccccc June 23, 2026 20:18
@github-actions github-actions Bot added triage-framework Should be looked at in framework triage p: material_ui labels Jun 23, 2026

@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 updates the generated Material Design token defaults from version 36.0.6 to 38.0.1. The changes restructure token classes across various component data files to introduce theme-specific variants, such as dark, light, and contrast-based configurations. Additionally, individual font properties are refactored to use TypescaleStruct definitions, and a new chips.dart file is introduced. I have no feedback to provide.

@Piinks Piinks changed the title Update M3E data tokens to version 38.0.1 [material_ui] Update M3E data tokens to version 38.0.1 Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD p: material_ui triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants