Skip to content

[material_ui] Import of Material tokens v38.0.58#12234

Draft
elliette wants to merge 1 commit into
flutter:m3e_migrationfrom
elliette:material_tokens_v38.0.58_501df0b4
Draft

[material_ui] Import of Material tokens v38.0.58#12234
elliette wants to merge 1 commit into
flutter:m3e_migrationfrom
elliette:material_tokens_v38.0.58_501df0b4

Conversation

@elliette

Copy link
Copy Markdown
Member

Import of tokens (see cl/944170221)

Pre-Review Checklist

Test exemption: Import of generated code.

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

FolderOrigin-RevId: /google/src/cloud/elliottbrooks/resolved-typescale/google3/javascript/materialdesign/tokens/compiler/formats/flutter/staging_output
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jul 17, 2026
@github-actions github-actions Bot added triage-framework Should be looked at in framework triage p: material_ui labels Jul 17, 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 Material UI default token generation data by upgrading the schema version and refactoring numerous token classes to reference centralized typescale definitions rather than inline TypescaleStruct declarations. Feedback on the changes highlights a compilation error in banners_rich.dart due to a missing import and an incorrect reference to TokenTypescaleEmphasized, as well as an inconsistent typescale mapping in slider.dart where tracking and weight properties do not match the other label properties.


import 'shape_struct.dart';
import 'typescale_struct.dart';
import 'typescale.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.

high

Import typescale_emphasized.dart to resolve the reference to TokenTypescaleEmphasized used for titleTextType.

Suggested change
import 'typescale.dart';
import 'typescale.dart';
import 'typescale_emphasized.dart';

Comment on lines +108 to +109
static const TypescaleStruct titleTextType =
TokenTypescale.emphasizedBodyMedium;

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.

high

emphasizedBodyMedium is defined in TokenTypescaleEmphasized (from typescale_emphasized.dart), not TokenTypescale. Referencing it on TokenTypescale will cause a compilation error.

Suggested change
static const TypescaleStruct titleTextType =
TokenTypescale.emphasizedBodyMedium;
static const TypescaleStruct titleTextType =
TokenTypescaleEmphasized.emphasizedBodyMedium;

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.

Hmmm good catch... 3P MD website doesn't have banner. In Carbon, rich Banner text style for 3p doesn't have values.

Screenshot 2026-07-17 at 12 54 32 PM

Comment on lines +224 to +229
static const double valueIndicatorLabelLabelTextTracking =
TokenTypescale.bodyLarge.letterSpacing;

/// md.comp.slider.value-indicator.label.label-text.weight
static const double valueIndicatorLabelLabelTextWeight =
TokenTypescale.bodyLarge.fontWeight;

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.

medium

There is a mismatch in the typescale mapping for the value indicator label text. The font, line-height, and size properties are mapped to TokenTypescale.labelLarge, but the tracking and weight properties are mapped to TokenTypescale.bodyLarge. They should consistently use TokenTypescale.labelLarge to avoid unexpected styling issues.

Suggested change
static const double valueIndicatorLabelLabelTextTracking =
TokenTypescale.bodyLarge.letterSpacing;
/// md.comp.slider.value-indicator.label.label-text.weight
static const double valueIndicatorLabelLabelTextWeight =
TokenTypescale.bodyLarge.fontWeight;
static const double valueIndicatorLabelLabelTextTracking =
TokenTypescale.labelLarge.letterSpacing;
/// md.comp.slider.value-indicator.label.label-text.weight
static const double valueIndicatorLabelLabelTextWeight =
TokenTypescale.labelLarge.fontWeight;

@elliette
elliette marked this pull request as draft July 17, 2026 23:28
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