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

feat: upgrade material-ui to 4.9.2 #1101

Merged
merged 11 commits into from
Feb 13, 2020
Merged

feat: upgrade material-ui to 4.9.2 #1101

merged 11 commits into from
Feb 13, 2020

Conversation

vedrani
Copy link
Contributor

@vedrani vedrani commented Feb 10, 2020

@vedrani vedrani requested a review from a team as a code owner February 10, 2020 21:15
Copy link
Collaborator

@denieler denieler left a 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 🤞

@toptal toptal deleted a comment from toptal-devbot Feb 12, 2020
@@ -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'
Copy link
Contributor

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?

Copy link
Contributor Author

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"
Copy link
Contributor

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

Copy link
Collaborator

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

Copy link
Contributor Author

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?

Copy link
Collaborator

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)',
Copy link
Contributor

Choose a reason for hiding this comment

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

😱

Copy link
Collaborator

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 😃

Copy link
Contributor Author

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

Copy link
Collaborator

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
Copy link
Contributor

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?

Copy link
Contributor Author

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'
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

MUI introduced primary and secondary color that are not compatible with HTML Input Element props and as we don't support color for our components in this case I omit color from our Props.

image

image

@@ -150,6 +154,7 @@ exports[`should render default checkbox with label 1`] = `
/>
<div
class="Checkbox-uncheckedIcon"
font-size="default"
Copy link
Collaborator

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"
Copy link
Collaborator

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'>
Copy link
Collaborator

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
Copy link
Collaborator

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?

Copy link
Contributor Author

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: {
Copy link
Collaborator

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)',
Copy link
Collaborator

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 😃

@denieler
Copy link
Collaborator

btw, don't forget to update package.json versions (and resolution section as well) if you didn't yet 😄

@vedrani
Copy link
Contributor Author

vedrani commented Feb 12, 2020

btw, don't forget to update package.json versions (and resolution section as well) if you didn't yet 😄

Thanks will do.

@vedrani
Copy link
Contributor Author

vedrani commented Feb 12, 2020

Found 1 problem. It would be great to have side-effects for all components with behaviour.

image

@toptal-devbot
Copy link
Collaborator

🎉 Last commit is successfully deployed 🎉

Demo is available on:

Your davinci-bot 🚀

@vedrani vedrani merged commit 3082e50 into master Feb 13, 2020
@vedrani vedrani deleted the fx-740-mui-4.9-upgrade branch February 13, 2020 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants