-
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
28 - Update to Polymer 2.x - part 3 #31
Conversation
|
test/basic.html
Outdated
@@ -30,7 +30,7 @@ | |||
// Set input value | |||
autocomplete.text = value.toString(); | |||
// Trigger create suggestions | |||
suggestions._input.fire('keyup'); | |||
suggestions.dispatchEvent(new CustomEvent('keyup', { bubbles: true, composed: true })); |
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 there a reason for removing _input
?
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.
No, this was a mistake that also halted the tests. Added it back.
test/basic.html
Outdated
@@ -118,7 +118,7 @@ | |||
done(); | |||
}, 200); | |||
|
|||
suggestions._input.fire('focus', {}); | |||
suggestions.dispatchEvent(new CustomEvent('focus', { bubbles: true, composed: true })); |
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
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.
No, this was a mistake that also halted the tests. Added it back.
* Review changes. * Adjusting dispatchEvent. * Using Polymers Async. Refs #28
@Wurper Do you know if
It seemed to pass the tests, but not sure if it really passes the timeout. I cannot check because the documentation refuses to load. |
@dotpointer I checked the polymer source (if I looked at the correct one) and it looks like it puts in a microtask queue. No consideration to any delay. |
* Review fixes. * Replacing Polymer.Async with window.setTimeout because the latter is missing a duration parameter. Refs #28
@Wurper Replacing |
paper-autocomplete-chips.html
Outdated
@@ -389,9 +387,8 @@ | |||
return; | |||
} | |||
this.push('selectedItems', newSelection); | |||
this.async(function () { | |||
Polymer.Async.microTask.run(function () { |
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 change to arrow function and skip bind(this)?
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.
Yes, pushed a change.
* Review fixes. * Using arrow functions. Refs #28
Update to Polymer 2.x - part 3.
fire
withdispatchEvent
in tests.is
attribute from style incustom-style
.Not sure if the dom-repeat template should be wrapped in
dom-repeat
.I am also welcoming suggestions on more things to convert in this component, if there are any.
Issue is #28.