Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

feat(checkbox): add feature targeting for styles #4258

Merged
merged 4 commits into from
Jan 24, 2019

Conversation

mmalerba
Copy link
Collaborator

This PR adds Sass feature targeting to the checkbox component as part of #4227.

Currently blocked on #4228 which adds the mdc-feature-targeting package.

@mmalerba
Copy link
Collaborator Author

FYI: @kfranqueiro

@codecov-io
Copy link

codecov-io commented Jan 17, 2019

Codecov Report

Merging #4258 into master will increase coverage by 0.33%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4258      +/-   ##
==========================================
+ Coverage   98.58%   98.91%   +0.33%     
==========================================
  Files         127      127              
  Lines        5705     5705              
  Branches      762      762              
==========================================
+ Hits         5624     5643      +19     
+ Misses         81       62      -19
Impacted Files Coverage Δ
packages/mdc-checkbox/index.js 100% <0%> (+1.2%) ⬆️
packages/mdc-ripple/index.js 100% <0%> (+2.08%) ⬆️
packages/mdc-auto-init/index.js 100% <0%> (+2.77%) ⬆️
packages/mdc-tab/index.js 96.49% <0%> (+3.5%) ⬆️
packages/mdc-ripple/util.js 100% <0%> (+3.5%) ⬆️
packages/mdc-base/component.js 100% <0%> (+4.16%) ⬆️
packages/mdc-switch/index.js 97.95% <0%> (+6.12%) ⬆️
packages/mdc-tabs/tab/index.js 100% <0%> (+9.09%) ⬆️
packages/mdc-radio/index.js 97.43% <0%> (+12.82%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c52cfa...3024fa2. Read the comment docs.

@kfranqueiro kfranqueiro self-requested a review January 17, 2019 21:53
@kfranqueiro kfranqueiro self-assigned this Jan 17, 2019
Copy link
Contributor

@kfranqueiro kfranqueiro left a comment

Choose a reason for hiding this comment

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

Thanks for sending this out so quick! I saw what you meant RE the potential for reordering a few styles to combine blocks and those mostly seem reasonable. I left comments on the ones I saw, along with a few other things.

packages/mdc-checkbox/_keyframes.scss Outdated Show resolved Hide resolved
packages/mdc-checkbox/mdc-checkbox.scss Show resolved Hide resolved
packages/mdc-checkbox/_mixins.scss Show resolved Hide resolved
packages/mdc-checkbox/_mixins.scss Outdated Show resolved Hide resolved
packages/mdc-checkbox/_mixins.scss Show resolved Hide resolved
packages/mdc-checkbox/_mixins.scss Outdated Show resolved Hide resolved
packages/mdc-checkbox/_mixins.scss Outdated Show resolved Hide resolved
packages/mdc-checkbox/_mixins.scss Outdated Show resolved Hide resolved
packages/mdc-checkbox/_mixins.scss Outdated Show resolved Hide resolved
@include mdc-ripple-radius-unbounded;
}

@at-root {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I should point out that one change I did make was to remove this @at-root. It didn't seem necessary, and it would prevent people from doing something like:

@include mdc-checkbox();

.my-app-alternate-theme {
  // ... change some theme variables ...
  @include mdc-checkbox(color);
}

Correct me if I'm wrong though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I noticed this, and realized that it seemed unnecessary, since it wasn't nested under anything and afaik @include can be done top-level anyway. We might've gotten a little carried away when we were trying to reduce specificity.

Copy link
Contributor

@kfranqueiro kfranqueiro left a comment

Choose a reason for hiding this comment

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

LGTM, diffed before/after and the only diffs are moved properties which look fair. Currently running the mdc-checkbox screenshot tests locally to confirm no diffs, since they can't run on PRs from forks.

@mmalerba
Copy link
Collaborator Author

Oh interesting about the fork thing, should I be writing code on branches instead?

@kfranqueiro
Copy link
Contributor

I presume we'd have to give you access to do that, right? I don't think it's too big of a deal in these cases to run a subset of our screenshot tests manually.

Here's the report with 0 diffs for the checkbox screenshot tests: https://storage.googleapis.com/mdc-web-screenshot-tests/kfranqueiro/2019/01/24/21_26_52_748/report/report.html?utm_source=cli&utm_medium=test_results

@kfranqueiro kfranqueiro merged commit 0ed492c into material-components:master Jan 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants