Profile Avatar Selector: Allow user to navigate between avatars using arrow keys
BUG=639843
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Description was changed from ========== Profile Avatar Selector: Allow user to navigate between avatars using ...
4 years, 3 months ago
(2016-09-07 15:43:53 UTC)
#1
Description was changed from
==========
Profile Avatar Selector: Allow user to navigate between avatars using arrow keys
BUG=639843
==========
to
==========
Profile Avatar Selector: Allow user to navigate between avatars using arrow keys
BUG=639843
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
Moe
The CQ bit was checked by mahmadi@chromium.org to run a CQ dry run
4 years, 3 months ago
(2016-09-07 15:44:31 UTC)
#2
Description was changed from ========== Profile Avatar Selector: Allow user to navigate between avatars using ...
4 years, 3 months ago
(2016-09-07 15:45:36 UTC)
#4
Description was changed from
==========
Profile Avatar Selector: Allow user to navigate between avatars using arrow keys
BUG=639843
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
to
==========
Profile Avatar Selector: Allow user to navigate between avatars using arrow keys
BUG=639843
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
==========
4 years, 3 months ago
(2016-09-07 17:17:16 UTC)
#7
Dry run: This issue passed the CQ dry run.
Moe
Hi Dan, just a quick ping that this CL is an alternative to https://codereview.chromium.org/2269743002 and ...
4 years, 3 months ago
(2016-09-12 14:07:37 UTC)
#8
Hi Dan,
just a quick ping that this CL is an alternative to
https://codereview.chromium.org/2269743002 and needs your review.
Context:
We would like all four arrow keys to be used to navigate between the profile
avatar icons.
Left/Right are handled in IronMenubarBehavior which is not what paper-lisbox
uses (it uses IronMenuBehavior). However IronMenubarBehavior overrides the
up/down key handlers to be used for selection rather than
navigation which isn't what we want.
This CL creates a new selector element that
has both behaviors in a particular order which allows the four arrow keys to be
used for navigation (and correctly handling RTL).
Dan Beam
can we just update the upstream code to use addOwnKeyBinding()? is it intentional that they're ...
4 years, 3 months ago
(2016-09-15 16:42:05 UTC)
#9
On 2016/09/15 16:42:05, Dan Beam wrote: > can we just update the upstream code to ...
4 years, 3 months ago
(2016-09-15 17:34:14 UTC)
#10
On 2016/09/15 16:42:05, Dan Beam wrote:
> can we just update the upstream code to use addOwnKeyBinding()? is it
> intentional that they're fighting eachother?
>
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> File
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js
> (right):
>
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js:18:
> // Polymer.IronMenuBehavior.
> ehhhhhh, depending on order is kinda lame
is this what you're proposing?
if (RLT)
avatarList.addOwnKeyBinding('left', '_onDownKey');
avatarList.addOwnKeyBinding('right', '_onUpKey');
else
avatarList.addOwnKeyBinding('left', '_onUpKey');
avatarList.addOwnKeyBinding('right', '_onDownKey');
Dan Beam
On 2016/09/15 17:34:14, moe wrote: > On 2016/09/15 16:42:05, Dan Beam wrote: > > can ...
4 years, 3 months ago
(2016-09-15 17:39:14 UTC)
#11
On 2016/09/15 17:34:14, moe wrote:
> On 2016/09/15 16:42:05, Dan Beam wrote:
> > can we just update the upstream code to use addOwnKeyBinding()? is it
> > intentional that they're fighting eachother?
> >
> >
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> > File
> >
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js
> > (right):
> >
> >
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> >
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js:18:
> > // Polymer.IronMenuBehavior.
> > ehhhhhh, depending on order is kinda lame
>
> is this what you're proposing?
>
> if (RLT)
> avatarList.addOwnKeyBinding('left', '_onDownKey');
> avatarList.addOwnKeyBinding('right', '_onUpKey');
> else
> avatarList.addOwnKeyBinding('left', '_onUpKey');
> avatarList.addOwnKeyBinding('right', '_onDownKey');
so, in these behaviors, there are keyBindings properties. when you mix in 2
behaviors with the same keyBinding properties, do they clobber eachother?
Dan Beam
On 2016/09/15 17:39:14, Dan Beam wrote: > On 2016/09/15 17:34:14, moe wrote: > > On ...
4 years, 3 months ago
(2016-09-15 17:41:28 UTC)
#12
On 2016/09/15 17:39:14, Dan Beam wrote:
> On 2016/09/15 17:34:14, moe wrote:
> > On 2016/09/15 16:42:05, Dan Beam wrote:
> > > can we just update the upstream code to use addOwnKeyBinding()? is it
> > > intentional that they're fighting eachother?
> > >
> > >
> >
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> > > File
> > >
> >
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js
> > > (right):
> > >
> > >
> >
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> > >
> >
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js:18:
> > > // Polymer.IronMenuBehavior.
> > > ehhhhhh, depending on order is kinda lame
> >
> > is this what you're proposing?
> >
> > if (RLT)
> > avatarList.addOwnKeyBinding('left', '_onDownKey');
> > avatarList.addOwnKeyBinding('right', '_onUpKey');
> > else
> > avatarList.addOwnKeyBinding('left', '_onUpKey');
> > avatarList.addOwnKeyBinding('right', '_onDownKey');
>
> so, in these behaviors, there are keyBindings properties. when you mix in 2
> behaviors with the same keyBinding properties, do they clobber eachother?
ahhh, they should be able to coexist
https://cs.chromium.org/chromium/src/third_party/polymer/v1_0/components-chro...
Dan Beam
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js File ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js (right): https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js#newcode19 ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js:19: Polymer.IronMenubarBehavior, can we just just NOT use the full ...
4 years, 3 months ago
(2016-09-15 17:47:03 UTC)
#13
On 2016/09/15 17:41:28, Dan Beam wrote: > On 2016/09/15 17:39:14, Dan Beam wrote: > > ...
4 years, 3 months ago
(2016-09-15 17:47:29 UTC)
#14
On 2016/09/15 17:41:28, Dan Beam wrote:
> On 2016/09/15 17:39:14, Dan Beam wrote:
> > On 2016/09/15 17:34:14, moe wrote:
> > > On 2016/09/15 16:42:05, Dan Beam wrote:
> > > > can we just update the upstream code to use addOwnKeyBinding()? is it
> > > > intentional that they're fighting eachother?
> > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> > > > File
> > > >
> > >
> >
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js
> > > > (right):
> > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> > > >
> > >
> >
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js:18:
> > > > // Polymer.IronMenuBehavior.
> > > > ehhhhhh, depending on order is kinda lame
> > >
> > > is this what you're proposing?
> > >
> > > if (RLT)
> > > avatarList.addOwnKeyBinding('left', '_onDownKey');
> > > avatarList.addOwnKeyBinding('right', '_onUpKey');
> > > else
> > > avatarList.addOwnKeyBinding('left', '_onUpKey');
> > > avatarList.addOwnKeyBinding('right', '_onDownKey');
> >
> > so, in these behaviors, there are keyBindings properties. when you mix in 2
> > behaviors with the same keyBinding properties, do they clobber eachother?
>
> ahhh, they should be able to coexist
>
https://cs.chromium.org/chromium/src/third_party/polymer/v1_0/components-chro...
correct. the problem are the handlers that are being overridden.
Moe
On 2016/09/15 17:47:03, Dan Beam wrote: > https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js > File > ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js > (right): > ...
4 years, 3 months ago
(2016-09-15 17:51:35 UTC)
#15
On 2016/09/15 17:47:03, Dan Beam wrote:
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> File
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js
> (right):
>
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js:19:
> Polymer.IronMenubarBehavior,
> can we just just NOT use the full IronMenubarBehavior? and just copy the
parts
> that aren't silly for our use case?
sgtm. I'll go ahead and update the version 1 CL with the following and copy get
_isRTL() from the IronMenubarBehavior.
if (this._isRTL)
avatarList.addOwnKeyBinding('left', '_onDownKey');
avatarList.addOwnKeyBinding('right', '_onUpKey');
else
avatarList.addOwnKeyBinding('left', '_onUpKey');
avatarList.addOwnKeyBinding('right', '_onDownKey');
Moe
On 2016/09/15 17:51:35, moe wrote: > On 2016/09/15 17:47:03, Dan Beam wrote: > > > ...
4 years, 3 months ago
(2016-09-15 17:52:00 UTC)
#16
On 2016/09/15 17:51:35, moe wrote:
> On 2016/09/15 17:47:03, Dan Beam wrote:
> >
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> > File
> >
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js
> > (right):
> >
> >
>
https://codereview.chromium.org/2319123002/diff/1/ui/webui/resources/cr_eleme...
> >
>
ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_listbox.js:19:
> > Polymer.IronMenubarBehavior,
> > can we just just NOT use the full IronMenubarBehavior? and just copy the
> parts
> > that aren't silly for our use case?
>
> sgtm. I'll go ahead and update the version 1 CL with the following and copy
get
> _isRTL() from the IronMenubarBehavior.
>
> if (this._isRTL)
> avatarList.addOwnKeyBinding('left', '_onDownKey');
> avatarList.addOwnKeyBinding('right', '_onUpKey');
> else
> avatarList.addOwnKeyBinding('left', '_onUpKey');
> avatarList.addOwnKeyBinding('right', '_onDownKey');
closing this CL...
Issue 2319123002: Profile Avatar Selector: Allow arrow keys to be used for moving between avatars (2nd edition)
(Closed)
Created 4 years, 3 months ago by Moe
Modified 4 years, 3 months ago
Reviewers: Dan Beam
Base URL:
Comments: 2