-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[core] Remove makeStyles
from @material-ui/core
#26382
[core] Remove makeStyles
from @material-ui/core
#26382
Conversation
@dtassone we have this regression - https://www.argos-ci.com/mui-org/material-ui/builds/3599 after upgrading to |
@eps1lon @oliviertassinari what shall we do with notistack still using |
@@ -31,7 +31,7 @@ | |||
"@fortawesome/free-solid-svg-icons": "^5.14.0", | |||
"@fortawesome/react-fontawesome": "^0.1.11", | |||
"@material-ui/core": "5.0.0-alpha.34", | |||
"@material-ui/data-grid": "^4.0.0-alpha.21", | |||
"@material-ui/data-grid": "^4.0.0-alpha.29", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed, as this version does not use makeStyles
from @material-ui/core/styles
anymore.
@@ -18,7 +18,9 @@ const columns = [ | |||
sortable: false, | |||
width: 160, | |||
valueGetter: (params) => | |||
`${params.getValue('firstName') || ''} ${params.getValue('lastName') || ''}`, | |||
`${params.getValue(params.id, 'firstName') || ''} ${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a breaking change.
@@ -1617,8 +1642,6 @@ As the core components use emotion as a styled engine, the props used by emotion | |||
} | |||
``` | |||
|
|||
Note: If you would like to move |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup, was some leftover forgotten
|
Happy to go with whatever is the best. Option 1 seems to allow us to move fastest, but I am ok with any of the options. We could disable the example now and re-enable once |
Yes but looking at it now, I don't think it's great. We have largely enough space to render the title, it looks empty, and you wonder why the col title is not there or is cut as in the image below. |
Agree, maybe would be better if the toolbar (the icons) is rendered as some popover |
@dtassone I've increased the width of the columns by 20, it looks better now: We can update the example with the next release once this is fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Ideally just rewrite an import if that's possible. It's a good test whether the migration story is viable. |
Rewrite import + add |
Co-authored-by: Olivier Tassinari <[email protected]>
Where does |
I am creating it with |
We can rewrite this with babel in our repo. We're already doing a bunch of rewrites: So it sounds like we should be able to add the new one for compat if that is all required for migrating |
How can we do this, if only some of the imports from a package should be changed, for example: -import { makeStyles } from '@material-ui/core/styles';
+import { makeStyles } from '@material-ui/styles';
// but these should still be imported from @material-ui/core/styles
import { Theme, ThemProvider } from '@material-ui/core/styles'; |
sigh yeah, nevermind. The migration story is just all over the place unfortunately. |
makeStyles
from @material-ui/core/styles
makeStyles
from @material-ui/core
BREAKING CHANGE
The
makeStyles
JSS utility is no longer exported from@material-ui/core/styles
. You can use@material-ui/styles/makeStyles
instead. Make sure to add aThemeProvider
at the root of your application, as thedefaultTheme
is no longer available. If you are using this utility together with@material-ui/core
, it's recommended you use theThemeProvider
component from@material-ui/core/styles
instead.