-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(vwc-icon-button): viv-306 layout, shape, connotation support #504
Conversation
PR showcase deployed here. |
|
||
@include shape-mixins.shape( | ||
$shapes: ( | ||
rounded: 6px, |
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.
rounded is 6px by default. can we exclude this from override somehow?
PR showcase deployed here. |
PR showcase deployed here. |
PR showcase deployed here. |
PR showcase deployed here. |
PR showcase deployed here. |
PR showcase deployed here. |
PR showcase deployed here. |
PR showcase deployed here. |
PR showcase deployed here. |
@@ -3,14 +3,15 @@ | |||
@use '../functions'; | |||
|
|||
// override to apply relevance | |||
$layouts: filled outlined soft text !default; | |||
$layouts: filled outlined soft text ghost !default; |
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.
what's the difference between text & ghost?
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.
text and ghost styles are the same.
I didn't think layout="text" was appropriate for icon-button as there is no text in this element.
What do you think?
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.
Then remove the text
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.
Is anyone using layout="text" buttons?
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.
I'll check, if so, we can keep both as css selectors for backwards compatibility
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.
maybe late to the party, but:
- IMHO definitely just one of those should stay, and since it is used in
vwc-icon-button
which is text-less, as @JoelGraham93 mentioned,ghost
sounds better - maybe
transparent
is even better thanghost
?
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.
hmmm, if had to pick, I would 'ghost'. but am up for more ideas on that
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.
I'm happy with ghost as it's a common term for buttons with no fill colour - though they usually have a border.
Was there any discoveries about removing layout="text"? I see PR is labeled ready-to-merge
|
||
:host([layout='outlined']) { | ||
.mdc-icon-button:disabled { | ||
border-color: currentColor; |
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 previously had discussed this value as candidate for foreground color and decided to explicitly define the foreground variable. I dont mind either way but I'd vote for consistency
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.
assigned var in 544f26a
options: Object.values(Shape) | ||
options: Object.values(Shape).filter(s => [ | ||
Shape.Rounded, Shape.Pill | ||
].includes(s)), |
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.
why not just: [Shape.Rounded, Shape.Pill]
?
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.
dunno, it's just more supervised. it follows convention anyway, which is what we encourage, so better if this PR merges as is, and if we change this convention we do it in a dedicated PR
options: Object.values(Shape), | ||
options: Object.values(Shape).filter(s => [ | ||
Shape.Rounded, Shape.Pill | ||
].includes(s)), |
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.
same as remark above - why not simple array of white listed values?
Connotation.Info, | ||
Connotation.Announcement, | ||
].includes(c) | ||
); |
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.
same as above - why not a simple array?
Minimum allowed coverage is Generated by 🐒 cobertura-action against 330b36c |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This PR can make use of foundation
layouts
const andhandleMultipleSizeProps
util in #485