-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Chip] Add outlined variant #12680
Conversation
@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? |
@mbrookes Thank you :) |
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. |
@mbrookes |
I have approved the visual diff, but should outlined perhaps have its own demo section? |
@mbrookes |
There was a problem hiding this 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 🌊☀️.
docs/src/pages/demos/chips/chips.md
Outdated
@@ -25,6 +25,13 @@ and (string) Avatar. | |||
|
|||
{{"demo": "pages/demos/chips/Chips.js"}} | |||
|
|||
### Outlined Chips | |||
|
|||
Outlined chips offer alternative style |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period?
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
This comment was marked as resolved.
Sorry, something went wrong.
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: { |
There was a problem hiding this comment.
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.
@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) |
@mbrookes Thank you for merging the master branch into the PR. I adjusted the package size accordingly and all the tests are passing now. |
There was a problem hiding this 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.
@mbrookes great! |
There was a problem hiding this 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.
There was a problem hiding this 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" |
There was a problem hiding this comment.
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?
@mbrookes all done :) |
👌 |
@oliviertassinari Ever the eagle eye! 👍 |
@orporan Thanks for your perseverance! Less than a week 'till it's released. |
@mbrookes I'm releasing a v3.0.1 with the peer dependency fix. |
@mbrookes @oliviertassinari Thanks! it was a pleasure :) |
Added support for outlined chip as demonstrated in material design guidelines