Commit Graph
8 Commits
Author SHA1 Message Date
Nancy Li ddafaed114 [e2e] Fix the flaky test and reenable it
R=szuend@chromium.org

Bug: 1250358
Change-Id: Ia6632d6e23ef20a75e273fb59386856f0750a51e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3165300
Auto-Submit: Nancy Li <nancyly@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-09-17 05:43:37 +00:00
Simon Zünd d78dff0c3a [e2e] Disable flaky test on mac
Consistently failing on the Mac CQ bot.

R=nancyly@chromium.org

Bug: 1250358
Change-Id: I64ba608bba9db12868f78a5fc8dd8d3ecb251a38
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3165099
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Nancy Li <nancyly@chromium.org>
2021-09-16 16:35:45 +00:00
Jack Lynch 3a91cdb875 Settings: Improve display of shortcuts on Mac and non-US keyboards
Currently, the shortcut editor mostly just uses the KeyboardEvent.key
field to determine what to display in response to user input. This works
well for en-us keyboard on Windows, but often results in confusing
behavior on keyboards which input special characters with the alt key,
such as Option+c to produce ç on the default Mac US keyboard. In order
to better represent these keypresses, this CL adds KeyboardEvent.code as
a fallback for determining how to display a key in a shortcut.
The W3C details the relationship between physical keys and keycodes at
[1], but it is essentially a string equivalent to the now-deprecated
keyCode field that the DevTools have long used to determine whether
a keypress matches a shortcut. Due to the way Macs handle dead keys, it
is also necessary to set maxlength=0 on the input field to prevent the
OS from appending special characters to it.

Before/after, Ctrl+Option+C on mac: https://imgur.com/a/bizQhMJ


[1] https://www.w3.org/TR/uievents-code/#keyboard-key-codes

Bug: 174309
Change-Id: Ieff84821641d3206ec67b05658f6b23f9d0d36e4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2643919
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
2021-02-02 19:21:49 +00:00
Kim-Anh Tran 9c6a9b67fa [e2e] Temporarily skip flaky shortcuts test
TBR=jalyn@microsoft.com

Bug: chromium:1149346
Change-Id: I57063f765e99088d3962e5490a87fc1af062080b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2540346
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2020-11-16 13:38:52 +00:00
Jack Lynch 5db9eeec2f Settings: Allow users to create chord shortcuts
This CL adds the ability to create chords, or multi-keypress shortcuts,
to the shortcut editor. The ability for built-in chord shortcuts was
added here [1] in order to support those necessary for VS Code and
potentially other editor-matching presets (currently the only example is
Ctrl+K Ctrl+S to open the shortcuts settings with VS Code shortcuts
enabled).

The event listener that handles shortcut input keystrokes now starts a
timeout when it receives a non-modifier keypress, allowing the user to
begin a second key within 1000ms. If the user does, then the timeout is
cleared and the second key is added to the shortcut. Otherwise, any new
keystrokes after the timeout are considered the beginning of a new
shortcut entirely and the input's contents are replaced with the new
key.

[1] https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2125620
Video showing chord creation and timeout: https://i.imgur.com/wTjyxSg.mp4

Bug: 174309
Change-Id: Ic45fca8a5213f9befab6880c0c4ffbf41e22142a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2521142
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Brian Cui <brcui@microsoft.com>
2020-11-10 22:04:41 +00:00
Jack Lynch d529e88005 Reland "Settings: Add e2e tests for shortcuts tab"
This reverts commit f3b391e525.

Reason for revert: Some strings are different on mac, creating a reland to investigate a fix

Original change's description:
> Revert "Settings: Add e2e tests for shortcuts tab"
>
> This reverts commit 137f0a1b84.
>
> Reason for revert: Consistently fails on Mac Bot, first failure:
> https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8864995173425920000/+/steps/E2E_tests/0/stdout
>
> Original change's description:
> > Settings: Add e2e tests for shortcuts tab
> >
> > This CL adds several end to end tests for the shortcuts settings tab,
> > including the keyboard shortcut editor.
> >
> > Bug: 174309
> > Change-Id: I293f233f9afde298cb618fbdbb6c9b147b895daf
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2504790
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
> > Commit-Queue: Jack Lynch <jalyn@microsoft.com>
>
> TBR=jalyn@microsoft.com,tvanderlippe@chromium.org,patrick.brosset@microsoft.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: 174309
> Change-Id: Ie5ee124b3ad760dead6745e33591eb7578b69e88
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512225
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>

TBR=szuend@chromium.org,jalyn@microsoft.com,tvanderlippe@chromium.org,patrick.brosset@microsoft.com

# Not skipping CQ checks because this is a reland.

Bug: 174309
Change-Id: I8382dfab7a3e3a3dfaaa36e834d67636b33a6b9c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512850
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
2020-11-03 19:22:47 +00:00
Simon Zünd f3b391e525 Revert "Settings: Add e2e tests for shortcuts tab"
This reverts commit 137f0a1b84.

Reason for revert: Consistently fails on Mac Bot, first failure:
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8864995173425920000/+/steps/E2E_tests/0/stdout

Original change's description:
> Settings: Add e2e tests for shortcuts tab
>
> This CL adds several end to end tests for the shortcuts settings tab,
> including the keyboard shortcut editor.
>
> Bug: 174309
> Change-Id: I293f233f9afde298cb618fbdbb6c9b147b895daf
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2504790
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
> Commit-Queue: Jack Lynch <jalyn@microsoft.com>

TBR=jalyn@microsoft.com,tvanderlippe@chromium.org,patrick.brosset@microsoft.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 174309
Change-Id: Ie5ee124b3ad760dead6745e33591eb7578b69e88
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512225
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-11-02 07:37:30 +00:00
Jack Lynch 137f0a1b84 Settings: Add e2e tests for shortcuts tab
This CL adds several end to end tests for the shortcuts settings tab,
including the keyboard shortcut editor.

Bug: 174309
Change-Id: I293f233f9afde298cb618fbdbb6c9b147b895daf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2504790
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
2020-10-30 17:26:39 +00:00