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

feat(vwc-icon-button): viv-306 layout, shape, connotation support #504

Merged
merged 22 commits into from
Jan 6, 2021

Conversation

lagjamhero
Copy link
Contributor

This PR can make use of foundation layouts const and handleMultipleSizeProps util in #485

@github-actions
Copy link

PR showcase deployed here.


@include shape-mixins.shape(
$shapes: (
rounded: 6px,
Copy link
Contributor

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?

components/icon-button/src/vwc-icon-button.scss Outdated Show resolved Hide resolved
@github-actions
Copy link

PR showcase deployed here.

@github-actions
Copy link

PR showcase deployed here.

@github-actions
Copy link

PR showcase deployed here.

@github-actions
Copy link

PR showcase deployed here.

@github-actions
Copy link

PR showcase deployed here.

@github-actions
Copy link

PR showcase deployed here.

@github-actions
Copy link

PR showcase deployed here.

@github-actions
Copy link

PR showcase deployed here.

@github-actions
Copy link

PR showcase deployed here.

@lagjamhero lagjamhero marked this pull request as ready for review December 14, 2020 17:06
@@ -3,14 +3,15 @@
@use '../functions';

// override to apply relevance
$layouts: filled outlined soft text !default;
$layouts: filled outlined soft text ghost !default;
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 difference between text & ghost?

Copy link
Contributor Author

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?

Copy link
Contributor

@yinonov yinonov Dec 17, 2020

Choose a reason for hiding this comment

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

Then remove the text

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor

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 than ghost?

Copy link
Contributor

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

Copy link
Contributor Author

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

components/button/test/button.connotation.test.js Outdated Show resolved Hide resolved

:host([layout='outlined']) {
.mdc-icon-button:disabled {
border-color: currentColor;
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

assigned var in 544f26a

components/icon-button/src/vwc-icon-button.scss Outdated Show resolved Hide resolved
options: Object.values(Shape)
options: Object.values(Shape).filter(s => [
Shape.Rounded, Shape.Pill
].includes(s)),
Copy link
Contributor

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]?

Copy link
Contributor

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)),
Copy link
Contributor

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)
);
Copy link
Contributor

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?

@github-actions
Copy link

github-actions bot commented Dec 20, 2020

File Coverage
All files 80%
common/context/src/vvd-context.ts 96%
common/fonts/src/vvd-fonts.ts 83%
common/foundation/src/form-association/associate-with-form.ts 89%
common/foundation/src/form-association/common.ts 90%
common/foundation/src/form-association/submit-on-enter-key.ts 80%
common/scheme/src/os-sync.utils.ts 58%
common/scheme/src/vvd-scheme-style-tag-handler.ts 79%
common/scheme/src/vvd-scheme.ts 82%
components/audio/src/vwc-audio.ts 60%
components/button/src/vwc-button.ts 79%
components/carousel/src/vwc-carousel.ts 71%
components/drawer/src/vwc-drawer.ts 42%
components/fab/src/vwc-fab.ts 63%
components/file-picker/src/vwc-file-picker.ts 67%
components/icon-button-toggle/src/vwc-icon-button-toggle.ts 67%
components/icon-button/src/vwc-icon-button.ts 88%
components/icon/src/vwc-icon.js 92%
components/list/src/vwc-list-expansion-panel.ts 73%
components/list/src/vwc-list-item.ts 80%
components/media-controller/src/vwc-media-controller.ts 84%
components/select/src/vwc-select.ts 90%
components/slider/src/vwc-slider.ts 88%
components/textarea/src/vwc-textarea.ts 81%
components/textfield/src/vwc-textfield.ts 90%
components/theme-switch/src/vwc-theme-switch.ts 88%

Minimum allowed coverage is 75%

Generated by 🐒 cobertura-action against 330b36c

@lagjamhero lagjamhero requested a review from yinonov January 6, 2021 10:31
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 6, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.4% 1.4% Duplication

@yinonov yinonov merged commit 4b864bc into master Jan 6, 2021
@lagjamhero lagjamhero deleted the viv-306-icon-button branch January 6, 2021 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants