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

refactor(material/button): switch to tokens theming API #27784

Merged
merged 6 commits into from
Sep 15, 2023

Conversation

wagnermaciel
Copy link
Contributor

No description provided.

@wagnermaciel wagnermaciel marked this pull request as ready for review September 12, 2023 17:15
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

LGTM


// Tokens that can be configured through Angular Material's typography theming API.
@function get-typography-tokens($theme) {
@return ();
Copy link
Member

Choose a reason for hiding this comment

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

The typography and density styles are still using MDC's old API. Shouldn't we switch them over as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah this is what I was trying to bring up in standup but didn't have time to dive into. Currently all button variants are relying on the same styles for density & typography. I asked if I should split those out and Andrew said he was ok with landing this without doing so

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That said, I don't really know if I was able to explain the situation in the short time we had during standup. I'll ping Andrew and see if he can weigh in here

Copy link
Member

Choose a reason for hiding this comment

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

That's at least what we've been doing when converting the other components to tokens. For the filled button specifically it looks like we have these 5 tokens for the typography: label-text-font, label-text-size, label-text-tracking, label-text-transform, label-text-weight and the container-height token for the density.

Copy link
Contributor

Choose a reason for hiding this comment

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

Had a chat with Wagner - it'll be a bit easier to land the typography changes across all the variants at once after these PRs land. It'll just be a different iterative approach that reaches the same goal in the end (remove the old MDC mixins)

Copy link
Member

Choose a reason for hiding this comment

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

Alright, I wanted to make sure that we do it before we consider the button as migrated.

@wagnermaciel wagnermaciel added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Sep 15, 2023
@wagnermaciel wagnermaciel merged commit 48a988a into angular:main Sep 15, 2023
24 of 26 checks passed
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants