Repository navigation
Tri-state Checkbox - #14611
Tri-state Checkbox#14611
Conversation
381f1b9 to
689f831
Compare
There was a problem hiding this comment.
[triState] and [value] on the last line
There was a problem hiding this comment.
I would probably spell this "tristate", since "tri" isn't a word, but a prefix.
There was a problem hiding this comment.
not sure what you mean by "applied to" in this paragraph
There was a problem hiding this comment.
There was a problem hiding this comment.
Ah, ok. I think that phrasing would be confusing to our less mathematically-inclined users. I'd probably just say "will be called with the value" or some such.
There was a problem hiding this comment.
not sure what "applied to" means here either
There was a problem hiding this comment.
There was a problem hiding this comment.
nit: missing newline after last argument
There was a problem hiding this comment.
we need to convey the null state to the accessibility system
There was a problem hiding this comment.
I'd like to defer that to a separate PR. I've discussed it with @goderbauer; support for tristates isn't trivial.
There was a problem hiding this comment.
Can you leave a TODO here and/or file a bug?
There was a problem hiding this comment.
In general we should have the rule that all new widgets support accessibility, text scaling, localization, and bidi out of the box, but if there's a reason to make an exception here then ok.
There was a problem hiding this comment.
if tristate is true, this doesn't seem to give the user a way to get back to the indeterminate state. It seems like if tristate is true, this should go in the loop false -> true -> indeterminate -> false.
There was a problem hiding this comment.
That was intentional however I see that HTML tristates do cycle this way. So we can too.
There was a problem hiding this comment.
The main reason to do it this way is that if someone doesn't want this behaviour, they can easily just set tristate to false once the value isn't null, but if they do want this behaviour, there's nothing they can do if we don't implement it by default.
There was a problem hiding this comment.
this should verify that animations correctly handle:
true -> false
true -> indeterminate
false -> true
false -> indeterminate
indeterminate -> true
indeterminate -> false
689f831 to
52a19e1
Compare
|
Added a TODO and filed #14674 for smooth segues for cases where the checkbox value changes in the middle its animation cycle |
Added optional support for tri-state checkboxes, i.e. a checkbox whose value can be true, false, or null.
The checkboxes on the right were created with
triState: true,value: null.