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

[WIP] Support material-ui 1.0.0 #427

Merged
merged 15 commits into from
Jun 5, 2018
Merged

[WIP] Support material-ui 1.0.0 #427

merged 15 commits into from
Jun 5, 2018

Conversation

janowsiany
Copy link
Contributor

This is follow up of #355

I still want to add support for helperText property.
Tests need too be fixed.

@janowsiany janowsiany added the Type: Feature New features and feature requests label May 19, 2018
@janowsiany janowsiany self-assigned this May 19, 2018
@janowsiany janowsiany requested a review from radekmie as a code owner May 19, 2018 21:10
@janowsiany janowsiany mentioned this pull request May 19, 2018
3 tasks
@codecov
Copy link

codecov bot commented May 22, 2018

Codecov Report

Merging #427 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #427   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files         157    157           
  Lines        1401   1404    +3     
=====================================
+ Hits         1401   1404    +3
Impacted Files Coverage Δ
packages/uniforms-material/src/AutoField.js 100% <ø> (ø) ⬆️
packages/uniforms-material/src/ListItemField.js 100% <100%> (ø) ⬆️
packages/uniforms-material/src/TextField.js 100% <100%> (ø) ⬆️
packages/uniforms-material/src/ErrorField.js 100% <100%> (ø) ⬆️
packages/uniforms-material/src/DateField.js 100% <100%> (ø) ⬆️
packages/uniforms-material/src/ErrorsField.js 100% <100%> (ø) ⬆️
packages/uniforms-material/src/LongTextField.js 100% <100%> (ø) ⬆️
packages/uniforms-material/src/SubmitField.js 100% <100%> (ø) ⬆️
packages/uniforms-material/src/NestField.js 100% <100%> (ø) ⬆️
packages/uniforms-material/src/BoolField.js 100% <100%> (ø) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b09cfe1...9d607c7. Read the comment docs.

Copy link
Contributor

@radekmie radekmie left a comment

Choose a reason for hiding this comment

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

Few things:

  • (demo project) If you'll add a new friend field item, fill the first one and remove it, then the age is still there. It's not the case in other themes or current uniforms-material.
  • There are few more ordering problems, so maybe let's skip them for now and let's add it to the ESLint. What do you think?
  • I'm a bit concerned about all the new props being passed to some in-between components, like the <FormControl /> or <List />. It may be a problem to mantain all of them.

import AlarmIcon from '@material-ui/icons/Alarm';
import React from 'react';
import {mount} from 'enzyme';
import IconButton from '@material-ui/core/IconButton';
Copy link
Contributor

Choose a reason for hiding this comment

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

Ordering.

import AlarmIcon from '@material-ui/icons/Alarm';
import React from 'react';
import {mount} from 'enzyme';
import IconButton from '@material-ui/core/IconButton';
Copy link
Contributor

Choose a reason for hiding this comment

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

Ordering.

import {mount} from 'enzyme';

import SelectField from 'uniforms-material/SelectField';
import Select from '@material-ui/core/Select';
Copy link
Contributor

Choose a reason for hiding this comment

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

Ordering.

"uniforms": "^1.24.3"
},
"dependencies": {
"babel-runtime": "^6.20.0",
"prop-types": "^15.5.7"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these changes necessary? Also, babel-runtime is not required anymore?

"react": "^16.0.0 || ^15.0.0 || ^0.14.0",
"@material-ui/core": "^1.0.0",
"@material-ui/icons": "1.0.0",
"react": "^16.3.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a @material-ui/core requirement?

import joinName from 'uniforms/joinName';
import List from '@material-ui/core/List';
import ListSubheader from '@material-ui/core/ListSubheader';
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Ordering.

)}
</List>
<ListAddField name={`${name}.$`} initialCount={initialCount} />
</Fragment>
Copy link
Contributor

Choose a reason for hiding this comment

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

If @material-ui/core doesn't require react@16, I'd rather go with the <div /> and have more compatibility.

allowedValues,
checkboxes, // eslint-disable-line no-unused-vars
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 case here?


const Radio = ({
const Radio_ = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

If so, use the displayName to let the field be called RadioField.


import ListAddField from './ListAddField';
import ListItemField from './ListItemField';

const List = ({
actionsStyle,
const List_ = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

If so, use the displayName to let the field be called ListField.

@radekmie radekmie merged commit ab12392 into master Jun 5, 2018
@radekmie radekmie deleted the material-ui branch June 5, 2018 08:27
@radekmie
Copy link
Contributor

radekmie commented Jun 5, 2018

So, we have it! I'll do a pre-release soon.

@radekmie radekmie mentioned this pull request Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New features and feature requests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants