-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
chore(text-field): Move idle outline style method #1911
Conversation
Remove `getIdleOutlineStyleValue` method from textfield adapter. Add `getIdleOutlineStyleValue` method to textfield outline adapter. Update tests to check new functionality.
@@ -52,6 +52,12 @@ class MDCTextFieldOutline extends MDCComponent { | |||
const path = this.root_.querySelector(strings.PATH_SELECTOR); | |||
path.setAttribute('d', value); | |||
}, | |||
getIdleOutlineStyleValue: (propertyName) => { | |||
const idleOutlineElement = this.root_.parentNode.querySelector(strings.IDLE_OUTLINE_SELECTOR); |
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.
This is the only real funkiness. Since the idle outline is a sibling of the outline root, we need to access the parent node to be able to query it.
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.
LGTM!
Remove getIdleOutlineStyleValue from textfield foundation default adapter and test cases
Remove the extraneous `getIdleOutlineStyleValue` from text field foundation default adapter.
Codecov Report
@@ Coverage Diff @@
## master #1911 +/- ##
=======================================
Coverage 99.43% 99.43%
=======================================
Files 84 84
Lines 3721 3721
Branches 484 484
=======================================
Hits 3700 3700
Misses 21 21
Continue to review full report at Codecov.
|
Remove `getIdleOutlineStyleValue` method from text field adapter as it was unused following the merge of #1911
Remove `getIdleOutlineStyleValue` method from text field adapter as it was unused following the merge of #1911
Remove
getIdleOutlineStyleValue
method from textfield adapter. AddgetIdleOutlineStyleValue
method to textfield outline adapter. Updatetests to check new functionality.
BREAKING CHANGE: Text field outline adapter now must implement the
getIdleOutlineStyleValue
method previously implemented in the text field adapter. The functionality is exactly the same and requires only small changes to accessing the outline node.