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

[Button] Make primary the default color #21594

Merged
merged 10 commits into from
Jun 30, 2020

Conversation

mbrookes
Copy link
Member

@mbrookes mbrookes commented Jun 27, 2020

Breaking change

  • The button color prop is now "primary" by default, and "default" has been removed. This makes the button closer to the Material Design specification and simplifies the API.
-<Button color="default" />
-<Button color="primary" />
+<Button />
+<Button />

Closes #17530

Sorry, something went wrong.

@mbrookes mbrookes added breaking change component: button This is the name of the generic UI component, not the React module! labels Jun 27, 2020
@mui-pr-bot
Copy link

mui-pr-bot commented Jun 27, 2020

Details of bundle changes

Generated by 🚫 dangerJS against 02e7759

@oliviertassinari

This comment has been minimized.

@oliviertassinari

This comment has been minimized.

@mbrookes mbrookes changed the title [Button] deprecate default color for primary [Button] remove default color Jun 27, 2020

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@mbrookes mbrookes force-pushed the button-color-deprecate-default branch from 367c7bb to 3b8676d Compare June 27, 2020 21:47
@mbrookes mbrookes changed the title [Button] remove default color [Button] Make primary the default color Jun 27, 2020
@mbrookes

This comment has been minimized.

mbrookes added 2 commits June 28, 2020 03:01

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@mbrookes mbrookes force-pushed the button-color-deprecate-default branch from 6c1fc78 to aebbafd Compare June 28, 2020 02:42

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Looks great.

  • I could only find this case to fix:

Capture d’écran 2020-06-28 à 17 30 27

  • Could you also update the migration guide?

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@mbrookes
Copy link
Member Author

Could you also update the migration guide?

It was done already:

https://github.com/mui-org/material-ui/pull/21594/files?file-filters%5B%5D=.md#diff-019068d088cdf7a1aeda9214a944a589

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Comment on lines 65 to 67
```
/(<Button(\n*.*?)*?)color="primary"/$1/g
```
Copy link
Member

Choose a reason for hiding this comment

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

What does it mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a regex (in Vim search and replace format) that removes color="primary" from Buttons.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, maybe we should explain? I don't know how to use it. Do we have something that can work with VScode?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's omit it.

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
mbrookes and others added 2 commits June 28, 2020 23:32

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@oliviertassinari oliviertassinari merged commit c9e2181 into mui:next Jun 30, 2020
@oliviertassinari
Copy link
Member

Capture d’écran 2020-06-30 à 23 35 43

We have missed this regression. @mbrookes Could you have a look? :)

@mbrookes mbrookes deleted the button-color-deprecate-default branch July 1, 2020 00:05
@eps1lon eps1lon added this to the v5 milestone Jul 20, 2020
@eps1lon eps1lon mentioned this pull request Aug 5, 2020
42 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: button This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Button] Remove default color, use primary by default
4 participants