-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: upgrade material-ui to 4.9.2 #1101
Conversation
2ddc5b2
to
d7955a4
Compare
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.
I wish it will be a single change we need to do 🤞
@@ -14,7 +14,7 @@ To maintain consistency within `Picasso` repository we try to follow some conven | |||
```jsx | |||
import React from 'react' | |||
import cx from 'classnames' | |||
import { capitalize } from '@material-ui/core/utils/helpers' | |||
import capitalize from '@material-ui/core/utils/capitalize' |
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.
did they remove export of this helper from utils?
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.
Thanks, seems they export is as named export in utils
https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/index.js#L1
But seems they forgot to update TS file also :(
https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/index.d.ts
@@ -150,6 +154,7 @@ exports[`should render default checkbox with label 1`] = ` | |||
/> | |||
<div | |||
class="Checkbox-uncheckedIcon" | |||
font-size="default" |
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.
hmm, font-size? I've never seen something like this
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.
yeah, interesting how they use it
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.
It's part of MUI upgrade, do you think I should re-check impact on Picasso?
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.
no, don't think so, just interesting 😃
@@ -8,6 +8,9 @@ export default ({ palette, screens }: Theme) => | |||
}, | |||
container: {}, | |||
paper: { | |||
maxHeight: 'calc(100% - 6rem)', |
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.
😱
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 change is the scariest for me 😃
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.
Why? It was like that before and they decreased it to 'calc(100% - 64px)'
, so I defined it as 96px as it was.
mui/material-ui#17867
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.
ah, ok 😄 it was just missing for me from the style and "bam!" it's here 😁
| string | ||
| ((value: number, index: number) => React.ReactNode) | ||
index?: number | ||
valueLabelDisplay: ValueLabelDisplay |
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.
am I right that all those changes only for internal parts of picasso Slider?
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.
Yes, MUi changed what is sent to Slider Value Label component
@@ -29,7 +29,7 @@ export interface Props | |||
extends StandardProps, | |||
Omit< | |||
InputHTMLAttributes<HTMLInputElement>, | |||
'value' | 'defaultValue' | 'size' | |||
'value' | 'defaultValue' | 'size' | 'color' |
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.
What's the reason for this?
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.
@@ -150,6 +154,7 @@ exports[`should render default checkbox with label 1`] = ` | |||
/> | |||
<div | |||
class="Checkbox-uncheckedIcon" | |||
font-size="default" |
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.
yeah, interesting how they use it
@@ -25,12 +25,12 @@ exports[`renders Modal 1`] = ` | |||
/> | |||
<div | |||
class="MuiDialog-container PicassoModal-container MuiDialog-scrollPaper" | |||
role="document" | |||
role="none presentation" |
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.
I like to don't care about such things 👍 thank you MUI 😄
@@ -13,7 +13,7 @@ const formatLabel = val => { | |||
*/ | |||
const TooltipExample = () => { | |||
return ( | |||
<Container> | |||
<Container padded='small'> |
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.
❤️
@@ -30,7 +31,7 @@ export interface Props extends SliderProps { | |||
- **on** will display persistently. | |||
- **off** will never display | |||
*/ | |||
tooltip?: 'on' | 'auto' | 'off' | |||
tooltip?: ValueLabelDisplay |
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.
wouldn't it be a breaking change?
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.
No, I just moved it above :D
type ValueLabelDisplay = 'on' | 'auto' | 'off' |
@@ -30,7 +26,15 @@ PicassoProvider.override(({ breakpoints, palette, typography }: Theme) => ({ | |||
fontSize: '1rem' | |||
} | |||
}, | |||
selected: {}, | |||
selected: { |
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.
nice refactoring 👍 thanks! ❤️
@@ -8,6 +8,9 @@ export default ({ palette, screens }: Theme) => | |||
}, | |||
container: {}, | |||
paper: { | |||
maxHeight: 'calc(100% - 6rem)', |
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 change is the scariest for me 😃
btw, don't forget to update |
Thanks will do. |
e09a75d
to
ae60718
Compare
ae60718
to
9760951
Compare
9760951
to
40f75e8
Compare
🎉 Last commit is successfully deployed 🎉 Demo is available on: Your davinci-bot 🚀 |
FX-740
Description
Upgrade to 4.9.2
TODO