Skip to content

refactor(material-experimental/mdc-button): reorganize styles and expose all themes #22449

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
May 19, 2021

Conversation

crisbeto
Copy link
Member

When I was setting up the new theming API for MDC, I assumed that the button theme would include the icon button and fab themes as well, but that's not the case.
These changes reorganize the button theming styles into separate files so that we can easily expose the missing mixins under the correct prefix.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: major This PR is targeted for the next major release labels Apr 10, 2021
@crisbeto crisbeto requested a review from devversion as a code owner April 10, 2021 10:10
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 10, 2021
@crisbeto crisbeto added this to the 12.0.0 milestone Apr 10, 2021
@jelbourn
Copy link
Member

I'm surprised this is the case- it seems like we might want to change button-theme to emit the styles for all types of buttons so that the API is backwards compatible. @andrewseguin @mmalerba thoughts?

@mmalerba
Copy link
Contributor

I think Andrew did this intentionally to reduce unused CSS (fab probably isn't used all that often).

@jelbourn
Copy link
Member

Does the migration tool add this automatically?

@crisbeto
Copy link
Member Author

Which migration tool? The ng generate schematic doesn't have any logic for material-experimental.

@mmalerba
Copy link
Contributor

The internal migration tool does add all 3 themes when you migrate the button component

@crisbeto crisbeto added target: rc This PR is targeted for the next release-candidate and removed target: major This PR is targeted for the next major release labels Apr 14, 2021
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Apr 15, 2021
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 21, 2021
Updates all of the remaining docs to go through the new `@use` API instead of `@import`.

**Note:** does not include the `mdc-button` readme, because the necessary mixins aren't exported yet. See angular#22449.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 22, 2021
Updates all of the remaining docs to go through the new `@use` API instead of `@import`.

**Note:** does not include the `mdc-button` readme, because the necessary mixins aren't exported yet. See angular#22449.
Copy link
Contributor

@andrewseguin andrewseguin left a comment

Choose a reason for hiding this comment

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

LGTM - I believe the intention in splitting was to save size

andrewseguin pushed a commit that referenced this pull request Apr 27, 2021
Updates all of the remaining docs to go through the new `@use` API instead of `@import`.

**Note:** does not include the `mdc-button` readme, because the necessary mixins aren't exported yet. See #22449.
andrewseguin pushed a commit that referenced this pull request Apr 27, 2021
Updates all of the remaining docs to go through the new `@use` API instead of `@import`.

**Note:** does not include the `mdc-button` readme, because the necessary mixins aren't exported yet. See #22449.

(cherry picked from commit 1def768)
@crisbeto crisbeto added target: patch This PR is targeted for the next patch release and removed target: rc This PR is targeted for the next release-candidate labels May 15, 2021
…ose all themes

When I was setting up the new theming API for MDC, I assumed that the button theme would include the icon button and fab themes as well, but that's not the case.
These changes reorganize the button theming styles into separate files so that we can easily expose the missing mixins under the correct prefix.
@andrewseguin andrewseguin merged commit ba06cd8 into angular:master May 19, 2021
andrewseguin pushed a commit that referenced this pull request May 19, 2021
…ose all themes (#22449)

When I was setting up the new theming API for MDC, I assumed that the button theme would include the icon button and fab themes as well, but that's not the case.
These changes reorganize the button theming styles into separate files so that we can easily expose the missing mixins under the correct prefix.

(cherry picked from commit ba06cd8)
@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 Jun 19, 2021
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 cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants