Skip to content

[chip] Add outlined variant#12680

Merged
mbrookes merged 27 commits into
mui:masterfrom
crazylister:add-outlined-chip
Aug 28, 2018
Merged

[chip] Add outlined variant#12680
mbrookes merged 27 commits into
mui:masterfrom
crazylister:add-outlined-chip

Conversation

@orporan

@orporan orporan commented Aug 27, 2018

Copy link
Copy Markdown
Contributor

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 type: new feature Expand the scope of the product to solve a new problem. scope: chip Changes related to the chip. labels Aug 27, 2018
@mbrookes

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

orporan commented Aug 27, 2018

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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

orporan commented Aug 28, 2018

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Member

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

@orporan

orporan commented Aug 28, 2018

Copy link
Copy Markdown
Contributor Author

@mbrookes
Done :)

@oliviertassinari oliviertassinari left a comment

Copy link
Copy Markdown
Member

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 🌊☀️.

Comment thread docs/src/pages/demos/chips/chips.md Outdated

### Outlined Chips

Outlined chips offer alternative style

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Period?

Copy link
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

OutlinedChips

| 'deleteIcon'
| 'deleteIconPrimary'
| 'deleteIconSecondary';
| 'deleteIconSecondary'

This comment was marked as resolved.

Comment thread packages/material-ui/src/Chip/Chip.js Outdated
},
},
/* Styles applied to the deleteIcon element if `color="primary"` and `variant="outlined"`. */
deleteIconColorPrimaryOutlined: {

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

orporan commented Aug 28, 2018

Copy link
Copy Markdown
Contributor Author

@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

orporan commented Aug 28, 2018

Copy link
Copy Markdown
Contributor Author

@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 :)

@mbrookes mbrookes left a comment

Copy link
Copy Markdown
Member

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

orporan commented Aug 28, 2018

Copy link
Copy Markdown
Contributor Author

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

@mbrookes mbrookes left a comment

Copy link
Copy Markdown
Member

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.

@mbrookes mbrookes left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

orporan commented Aug 28, 2018

Copy link
Copy Markdown
Contributor Author

@mbrookes all done :)

@mbrookes

Copy link
Copy Markdown
Member

👌

@mbrookes

Copy link
Copy Markdown
Member

@oliviertassinari Ever the eagle eye! 👍

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

Copy link
Copy Markdown
Member

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

@oliviertassinari

Copy link
Copy Markdown
Member

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

@orporan

orporan commented Aug 28, 2018

Copy link
Copy Markdown
Contributor Author

@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
@oliviertassinari oliviertassinari changed the title [Chip] Add outlined variant [chip] Add outlined variant May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: chip Changes related to the chip. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants