-
Notifications
You must be signed in to change notification settings - Fork 62
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
paper-checkbox-light #145
base: master
Are you sure you want to change the base?
paper-checkbox-light #145
Conversation
I'll remove the validation tests soon since they no longer apply; the line-height test failing was unexpected though. |
<h3>Checkboxes can be checked or unchecked, or disabled entirely</h3> | ||
<demo-snippet class="centered-demo"> | ||
<template> | ||
<paper-checkbox-light></paper-checkbox-light> |
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.
I would also add a demo for "what should you do if you want a label"
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.
Actually, I would also bring back the subtitle examples, but with flexbox or whatever you need. Maybe just have a section "Checkboxes with labels", and do a bunch of examples? Like single line, multi-line-align-top, multi-line-align-center?
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.
Ok, I added them back.
|
Also, |
c30387f
to
b9400af
Compare
Added |
8f29b9f
to
14b7f6a
Compare
As usual, Firefox and Selenium have reacted violently; everything seems ok locally though. |
* Focus events occuring less than this value (in milliseconds) after a | ||
* 'down' event are considered to be the result of a pointer. | ||
*/ | ||
__POINTER_FOCUS_WINDOW: 30, |
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.
Uhmmmm is this the alternative to receivedFocusFromKeyboard
? Does it fix the problem where switching tabs focuses the element? Should we port this to IronControlState
as well?
/cc @cdata
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.
Uhmmmm is this the alternative to
receivedFocusFromKeyboard
?
Yeah, the behavior seems pretty much the same (as far as I can tell) except paper-checkbox-light also ripples when toggling with the keyboard after you initially focused it with a pointer. At some point I'd also like to make the persistent ripple come back when you toggle with the keyboard but I don't think it's strictly necessary for this PR, given regular paper-checkbox doesn't do this either.
Does it fix the problem where switching tabs focuses the element?
Shouldn't it receive focus when you switch back to the page?
The builds are now lying to us... They failed, even though it's just the usual Firefox + Selenium and Sauce Connect timeout problems, but they're reporting as having passed. |
@bicknellr Yeah, i merged a PR yesterday that was all green, but the tests were legit broken 😭 |
Note to self: #149 |
ping @notwaldorf |
var isSpace = event.key === ' ' || event.code === 'Space' || event.keyCode === 32; | ||
var isEnter = event.key === 'Enter' || event.code === 'Enter' || event.keyCode === 13; | ||
if (isSpace || isEnter) { | ||
event.preventDefault(); |
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.
Do you need stopImmediatePropagation
too?
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.
I don't think so; preventDefault
seems to be enough to stop scrolling.
minor comments left. If the tests are green and the demos look ok, then LGTM |
1e020b8
to
3a14255
Compare
I added 3a14255...paper-checkbox-light. |
Ok, figured out why the tests were failing in some older browsers: I had used method syntax in an object literal. |
@notwaldorf mind taking another look? |
Running into some performance issues with paper-checkbox, what's the status of this? |
Diff with master:
d38cacc...paper-checkbox-light
Key differences with paper-checkbox: