Skip to content

refactor(material/button): clean up fab tokens #27994

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

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

crisbeto
Copy link
Member

Reworks the tokens setup for the FAB by:

  • Introducing a custom tokens map. It was necessary both for these changes and will come in handy later for the ripples.
  • Using tokens specifically for the disabled state instead of passing in the non-disabled ones. This aligns the FAB with the rest of the library and allows us to reduce the specificity.
  • Introducing a tokens specifically for the icon/text color. Currently we have an ad-hoc variable declared directly in the component styles.
  • Using our own mixins for the elevation instead of MDC's. Our mixin calls into MDC eventually, but it has some safeguards as well.
  • Generating the tokens that we pass into MDC's theme using our APIs, instead of creating the map directly.

@crisbeto crisbeto requested a review from wagnermaciel October 25, 2023 08:09
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: rc This PR is targeted for the next release-candidate labels Oct 25, 2023
Reworks the tokens setup for the FAB by:
* Introducing a custom tokens map. It was necessary both for these changes and will come in handy later for the ripples.
* Using tokens specifically for the disabled state instead of passing in the non-disabled ones. This aligns the FAB with the rest of the library and allows us to reduce the specificity.
* Introducing a tokens specifically for the icon/text color. Currently we have an ad-hoc variable declared directly in the component styles.
* Using our own mixins for the elevation instead of MDC's. Our mixin calls into MDC eventually, but it has some safeguards as well.
* Generating the tokens that we pass into MDC's theme using our APIs, instead of creating the map directly.
@crisbeto crisbeto self-assigned this Oct 25, 2023
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Oct 25, 2023
@crisbeto crisbeto merged commit e9fc04d into angular:main Oct 25, 2023
crisbeto added a commit that referenced this pull request Oct 25, 2023
Reworks the tokens setup for the FAB by:
* Introducing a custom tokens map. It was necessary both for these changes and will come in handy later for the ripples.
* Using tokens specifically for the disabled state instead of passing in the non-disabled ones. This aligns the FAB with the rest of the library and allows us to reduce the specificity.
* Introducing a tokens specifically for the icon/text color. Currently we have an ad-hoc variable declared directly in the component styles.
* Using our own mixins for the elevation instead of MDC's. Our mixin calls into MDC eventually, but it has some safeguards as well.
* Generating the tokens that we pass into MDC's theme using our APIs, instead of creating the map directly.

(cherry picked from commit e9fc04d)
@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 Nov 25, 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 P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants