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

[Chip] Add outlined variant #12680

Merged
merged 27 commits into from
Aug 28, 2018
Merged

[Chip] Add outlined variant #12680

merged 27 commits into from
Aug 28, 2018

Conversation

orporan
Copy link
Contributor

@orporan orporan commented Aug 27, 2018

Added support for outlined chip as demonstrated in material design guidelines

@oliviertassinari oliviertassinari changed the title [core] Add outlined chip [Chip] Add outlined variant Aug 27, 2018
@oliviertassinari oliviertassinari added new feature New feature or request component: chip This is the name of the generic UI component, not the React module! labels Aug 27, 2018
@mbrookes
Copy link
Member

@orporan Nice job!

From the spec it seems that the outlined chip has lighter shades for hover & focused states. Do you think we should add those?

@orporan
Copy link
Contributor Author

orporan commented Aug 27, 2018

@mbrookes Thank you :)
I added the background colors for hover and focus states, but I keep getting build errors due to issues with the yarn package registry and I don't see a way for me to rerun the tests. how do I go about it?

@mbrookes
Copy link
Member

The style descriptions are likely failing because they are split over two lines - at the moment that isn't supported. If the descriptions can't be condensed to 100 chars, we'll have to fix that.

@orporan
Copy link
Contributor Author

orporan commented Aug 28, 2018

@mbrookes
I got a failure in argos because I changed the Demo page to show the new Chip behavior.
https://www.argos-ci.com/mui-org/material-ui/builds/31206
What do I do about it?

@mbrookes
Copy link
Member

I have approved the visual diff, but should outlined perhaps have its own demo section?

@orporan
Copy link
Contributor Author

orporan commented Aug 28, 2018

@mbrookes
Done :)

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

A quick review while I'm at the beach 🌊☀️.

@@ -25,6 +25,13 @@ and (string) Avatar.

{{"demo": "pages/demos/chips/Chips.js"}}

### Outlined Chips

Outlined chips offer alternative style
Copy link
Member

Choose a reason for hiding this comment

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

Period?

Copy link
Member

Choose a reason for hiding this comment

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

"offer alternative style" -> "offer an alternative style."

alert('You clicked the Chip.'); // eslint-disable-line no-alert
}

function Chips(props) {
Copy link
Member

Choose a reason for hiding this comment

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

OutlinedChips

@@ -29,7 +30,9 @@ export type ChipClassKey =
| 'label'
| 'deleteIcon'
| 'deleteIconPrimary'
| 'deleteIconSecondary';
| 'deleteIconSecondary'

This comment was marked as resolved.

deleteIconColorSecondary: {
color: fade(theme.palette.primary.contrastText, 0.65),
'&:hover, &:active': {
color: theme.palette.primary.contrastText,
},
},
/* Styles applied to the deleteIcon element if `color="primary"` and `variant="outlined"`. */
deleteIconColorPrimaryOutlined: {
Copy link
Member

Choose a reason for hiding this comment

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

We should probably reverse color primary and outlined.

@orporan
Copy link
Contributor Author

orporan commented Aug 28, 2018

@mbrookes @oliviertassinari Thanks for the quick review. I addressed all comments and the tests are passing (except for argos, but that's due to the intentional change in Demo components)

@orporan
Copy link
Contributor Author

orporan commented Aug 28, 2018

@mbrookes Thank you for merging the master branch into the PR. I adjusted the package size accordingly and all the tests are passing now.
I hope its okay that I'm asking, but how soon can this be released? I need to use it for something :)

Copy link
Member

@mbrookes mbrookes left a comment

Choose a reason for hiding this comment

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

@orporan Looks good to go. 👌

Once merged, it will be released in the next weekly release cycle.

@orporan
Copy link
Contributor Author

orporan commented Aug 28, 2018

@mbrookes great!
Is there anything else I need to do for this to get merged?

Copy link
Member

@mbrookes mbrookes left a comment

Choose a reason for hiding this comment

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

@orporan Sorry, yes. I just realised we don't have any tests for the new variant. It should be straightforward enough to duplicate a test and modify it to check that the correct classes are applied when the outlined variant is specified.

Copy link
Member

@mbrookes mbrookes left a comment

Choose a reason for hiding this comment

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

That was quick. 😄 One last request...

<FaceIcon />
</Avatar>
}
label="Clickable Link Chip"
Copy link
Member

Choose a reason for hiding this comment

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

Not your fault as it came from the prior demo, but the labels on the last three chips don't seem to match their purpose. The last two are primary color and secondary color, and the third-last seems to be a smoosh of a whole bunch - primary clickable custom delete.

Please could you give them appropriate labels in both examples?

@orporan
Copy link
Contributor Author

orporan commented Aug 28, 2018

@mbrookes all done :)

@mbrookes
Copy link
Member

👌

@mbrookes
Copy link
Member

@oliviertassinari Ever the eagle eye! 👍

@mbrookes mbrookes merged commit aa5c442 into mui:master Aug 28, 2018
@mbrookes
Copy link
Member

@orporan Thanks for your perseverance! Less than a week 'till it's released.

@oliviertassinari
Copy link
Member

@mbrookes I'm releasing a v3.0.1 with the peer dependency fix.

@orporan
Copy link
Contributor Author

orporan commented Aug 28, 2018

@mbrookes @oliviertassinari Thanks! it was a pleasure :)

@orporan orporan deleted the add-outlined-chip branch August 28, 2018 21:51
marcelpanse pushed a commit to marcelpanse/material-ui that referenced this pull request Oct 2, 2018
@LorenzHenk LorenzHenk mentioned this pull request Dec 18, 2019
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: chip This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants