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

fix(radio): remove getNativeControl from adapter #3785

Merged
merged 5 commits into from
Oct 16, 2018

Conversation

moog16
Copy link
Contributor

@moog16 moog16 commented Oct 15, 2018

fixes #3763
related #2684

BREAKING CHANGE: Removed getNativeControl from adapter, and subsequent foundation methods that called getNativeControl. Foundation methods removed: isChecked, setChecked, isDisabled, getValue, setValue.

@codecov-io
Copy link

codecov-io commented Oct 15, 2018

Codecov Report

Merging #3785 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3785      +/-   ##
==========================================
- Coverage   98.52%   98.52%   -0.01%     
==========================================
  Files         120      120              
  Lines        5236     5224      -12     
  Branches      658      657       -1     
==========================================
- Hits         5159     5147      -12     
  Misses         77       77
Impacted Files Coverage Δ
packages/mdc-radio/foundation.js 100% <100%> (ø) ⬆️
packages/mdc-radio/index.js 97.43% <100%> (ø) ⬆️

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 6fa2269...bd18aef. Read the comment docs.

@mdc-web-bot
Copy link
Collaborator

All 557 screenshot tests passed for commit 1b0feca vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 560 screenshot tests passed for commit 92cb7c7 vs. master! 💯🎉

Copy link
Contributor

@acdvorak acdvorak left a comment

Choose a reason for hiding this comment

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

Just a few nits, otherwise LGTM!

| `removeClass(className: string) => void` | Removes a class from the root element |
Method Signature | Description
--- | ---
`setNativeControlDisabled() => void` | Sets the input to disabled
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing disabled: boolean argument.

Also update description to something like:

Sets the input's `disabled` property to the given value

assert.isTrue(radio.disabled);
});

test('#adapter.setNativeControlDisabled returns false when checkbox is not disabled', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I found the wording of this description a little confusing.

Maybe rephrase it to:

"#adapter.setNativeControlDisabled sets the native control element's disabled property to false"

assert.isFalse(root.classList.contains('foo'));
});

test('#adapter.setNativeControlDisabled sets the native control element disabled', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I found the wording of this description a little confusing.

Maybe rephrase it to:

"#adapter.setNativeControlDisabled sets the native control element's disabled property to true"

@mdc-web-bot
Copy link
Collaborator

All 560 screenshot tests passed for commit bd18aef vs. master! 💯🎉

@moog16 moog16 merged commit 75cf88c into master Oct 16, 2018
@moog16 moog16 deleted the fix/radio/remove-getnativecontrol-from-adapter branch October 16, 2018 23:59
kfranqueiro pushed a commit that referenced this pull request Oct 17, 2018
BREAKING CHANGE: Removed getNativeControl from adapter, and subsequent foundation methods that called getNativeControl. Foundation methods removed: isChecked, setChecked, isDisabled, getValue, setValue.
@jamesmfriedman jamesmfriedman mentioned this pull request Oct 30, 2018
27 tasks
trimox added a commit to trimox/angular-mdc-web that referenced this pull request Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Radio getNativeControl from adapter
5 participants