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

Update material-ui to version 4 #1394

Merged
merged 4 commits into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,283 changes: 721 additions & 562 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
},
"dependencies": {
"@date-io/moment": "1.1.0",
"@material-ui/core": "^3.3.1",
"@material-ui/icons": "^3.0.1",
"@material-ui/lab": "^3.0.0-alpha.21",
"@material-ui/core": "^4.0.1",
"@material-ui/icons": "^4.0.1",
"@material-ui/lab": "^4.0.0-alpha.15",
"material-ui-pickers": "^2.2.4",
"moment": "^2.20.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const MaterialListWithDetailRenderer =
addItem={addItem}
createDefault={handleCreateDefaultValue}
/>
<Grid container direction='row' spacing={16}>
<Grid container direction='row' spacing={2}>
<Grid item xs={3}>
<List>
{data > 0 ?
Expand Down
2 changes: 1 addition & 1 deletion packages/material/src/complex/TableToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const TableToolbar = React.memo((
container
justify={'flex-start'}
alignItems={'center'}
spacing={16}
spacing={2}
>
<Grid item>
<Typography variant={'h6'}>{label}</Typography>
Expand Down
2 changes: 1 addition & 1 deletion packages/material/src/controls/MaterialSliderControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class MaterialSliderControl extends Control<ControlProps, ControlState> {
min={schema.minimum}
max={schema.maximum}
value={Number(data || schema.default)}
onChange={(_ev, value) => {
onChange={(_ev: any, value: any) => {
handleChange(path, Number(value));
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/material/src/util/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const MaterialLayoutRenderer = ({
<Grid
container
direction={direction}
spacing={direction === 'row' ? 16 : 0}
spacing={direction === 'row' ? 10 : 0}
Copy link
Member

Choose a reason for hiding this comment

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

I fear you missed this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very spooky 👻

Have updated!

Copy link
Member

Choose a reason for hiding this comment

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

Great, my German to English translation failed 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.

Haha 😂 not at all! Apologies I was making a bad joke.

>
{renderLayoutElements(elements, schema, path, renderers)}
</Grid>
Expand Down
12 changes: 6 additions & 6 deletions packages/material/test/renderers/MaterialArrayLayout.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,15 @@ describe('Material array layout', () => {
// up button
expect(
wrapper
.find('ExpansionPanelSummary')
.find('ExpandPanelRenderer')
.at(0)
.find('button')
.find({ 'aria-label': 'Move up' }).length
).toBe(1);
// down button
expect(
wrapper
.find('ExpansionPanelSummary')
.find('ExpandPanelRenderer')
.at(0)
.find('button')
.find({ 'aria-label': 'Move down' }).length
Expand All @@ -349,7 +349,7 @@ describe('Material array layout', () => {
);
// getting up button of second item in expension panel;
const upButton = wrapper
.find('ExpansionPanelSummary')
.find('ExpandPanelRenderer')
.at(1)
.find('button')
.find({ 'aria-label': 'Move up' });
Expand Down Expand Up @@ -379,7 +379,7 @@ describe('Material array layout', () => {
);
// getting up button of second item in expension panel;
const upButton = wrapper
.find('ExpansionPanelSummary')
.find('ExpandPanelRenderer')
.at(0)
.find('button')
.find({ 'aria-label': 'Move down' });
Expand Down Expand Up @@ -409,7 +409,7 @@ describe('Material array layout', () => {
);
// getting up button of second item in expension panel;
const upButton = wrapper
.find('ExpansionPanelSummary')
.find('ExpandPanelRenderer')
.at(0)
.find('button')
.find({ 'aria-label': 'Move up' });
Expand All @@ -430,7 +430,7 @@ describe('Material array layout', () => {
);
// getting up button of second item in expension panel;
const downButton = wrapper
.find('ExpansionPanelSummary')
.find('ExpandPanelRenderer')
.at(1)
.find('button')
.find({ 'aria-label': 'Move down' });
Expand Down