Commit graph

93 commits

Author SHA1 Message Date
Niklas Baumgardner
077710c6ab Bug 1893800 - Align screenshots buttons container to viewport. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D209076
2024-05-08 19:50:43 +00:00
Norisz Fay
7c44bfe946 Backed out changeset 93caa282194b (bug 1893800) for causing bc failure on browser_test_resize.js 2024-05-07 05:55:47 +03:00
Niklas Baumgardner
f2d0238866 Bug 1893800 - Align screenshots buttons container to viewport. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D209076
2024-05-06 21:35:39 +00:00
Norisz Fay
e893f3b74e Backed out changeset b41cffd6d5f2 (bug 1893800) for causing failures on browser_test_element_picker.js CLOSED TREE 2024-05-06 20:31:29 +03:00
Niklas Baumgardner
0cbb15c60f Bug 1893800 - Align screenshots buttons container to viewport. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D209076
2024-05-06 16:41:59 +00:00
Niklas Baumgardner
6eb9b2d8f2 Bug 1893680 - Offset screenshots overlay when scrollMin is negative. r=sfoster,desktop-theme-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D208769
2024-05-04 19:41:59 +00:00
Niklas Baumgardner
49219fbed3 Bug 1801957 - Create region with keyboard for screenshots. r=sfoster,firefox-desktop-core-reviewers ,accessibility-frontend-reviewers,Gijs,morgan
The problem I'm trying to solve: There is currently no way to create a selected region in the screenshots overlay with the keyboard.
I recently added support for resizing a selected region in bug 1801954, but a user still needs to create a region with the mouse before the keyboard can be used.

I tried to look at what other browsers are doing in this scenario. Unfortunately there isn't much to go off. Most browsers, I can't even take a screenshot and the only browser that I found to have keyboard support for screenshots is MS Edge. In Edge, when you open screenshots, if your mouse isn't over the content area it will immediately move your mouse to the center of the page. If your mouse is over the content, it remains in place. Then, arrow keys will move the cursor around and you can hit space/enter to start creating a region.

I didn't like that Edge moved the mouse immediately after opening screenshots so I took a different approach.

My approach:
Screenshots will not move the mouse until an arrow key is pressed.
How it works:
If your cursor is above the content and an arrow key is pressed, the cursor will move in the direction of the arrow key that was pressed.
If your cursor is not above the content and a arrow key is pressed, the cursor will be moved to the middle of the content. Screenshots will not move the cursor until an arrow key is pressed.

When moving around the overlay with the keyboard: only hitting an arrow key will move the cursor around by 1px. If shift + arrow key, the cursor will move around by 10px.
When space is clicked while moving the cursor, it will start a region. Moving the arrow keys allows the region to sized.
When the cursor is above an element and the hover element rect is visible, hitting enter will select that region. If no hover element region exists, enter will behave the same as space.

I am also keeping the screenshots UI focused in this patch. Tab/shift + tab will keep focus to screenshots UI. Shift + F6 will escape the focus loop I've made in this patch if needed. Although, if a user has entered screenshots, it makes sense that for the current time, only screenshots UI is focusable.

Differential Revision: https://phabricator.services.mozilla.com/D197703
2024-05-03 22:05:52 +00:00
Cristian Tuns
f388d3e51f Backed out changeset 91e7087aef18 (bug 1801957) for causing bc failures in browser_keyboard_tests.js CLOSED TREE 2024-05-02 12:14:10 -04:00
Niklas Baumgardner
83b479b588 Bug 1801957 - Create region with keyboard for screenshots. r=sfoster,firefox-desktop-core-reviewers ,accessibility-frontend-reviewers,Gijs,morgan
The problem I'm trying to solve: There is currently no way to create a selected region in the screenshots overlay with the keyboard.
I recently added support for resizing a selected region in bug 1801954, but a user still needs to create a region with the mouse before the keyboard can be used.

I tried to look at what other browsers are doing in this scenario. Unfortunately there isn't much to go off. Most browsers, I can't even take a screenshot and the only browser that I found to have keyboard support for screenshots is MS Edge. In Edge, when you open screenshots, if your mouse isn't over the content area it will immediately move your mouse to the center of the page. If your mouse is over the content, it remains in place. Then, arrow keys will move the cursor around and you can hit space/enter to start creating a region.

I didn't like that Edge moved the mouse immediately after opening screenshots so I took a different approach.

My approach:
Screenshots will not move the mouse until an arrow key is pressed.
How it works:
If your cursor is above the content and an arrow key is pressed, the cursor will move in the direction of the arrow key that was pressed.
If your cursor is not above the content and a arrow key is pressed, the cursor will be moved to the middle of the content. Screenshots will not move the cursor until an arrow key is pressed.

When moving around the overlay with the keyboard: only hitting an arrow key will move the cursor around by 1px. If shift + arrow key, the cursor will move around by 10px.
When space is clicked while moving the cursor, it will start a region. Moving the arrow keys allows the region to sized.
When the cursor is above an element and the hover element rect is visible, hitting enter will select that region. If no hover element region exists, enter will behave the same as space.

I am also keeping the screenshots UI focused in this patch. Tab/shift + tab will keep focus to screenshots UI. Shift + F6 will escape the focus loop I've made in this patch if needed. Although, if a user has entered screenshots, it makes sense that for the current time, only screenshots UI is focusable.

Differential Revision: https://phabricator.services.mozilla.com/D197703
2024-05-02 15:34:39 +00:00
Niklas Baumgardner
b3205338ac Bug 1892125 - Refactor screenshots preview. r=sfoster,fluent-reviewers,desktop-theme-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D207884
2024-04-30 23:55:55 +00:00
Sam Foster
0accdc5e7f Bug 1893460 - Align overlay buttons to the end-edge of the selection box for LTR and RTL. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D208684
2024-04-26 23:45:25 +00:00
Niklas Baumgardner
2d0c9cc18c Bug 1887093 - Remember text selection regions during screenshots interactions. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D206696
2024-04-17 19:49:50 +00:00
Itiel
64b1ada9cb Bug 1891604 - Change the x sign in the Screenshots overlay to × r=niklas,sfoster,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D207480
2024-04-16 23:30:45 +00:00
Itiel
262930449f Bug 1891247 - Force LTR to the selection overlay size in the Screenshots overlay r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D207369
2024-04-16 04:15:26 +00:00
Niklas Baumgardner
c3a7319e09 Bug 1889438 - Dragging scrollbar should not select region in screenshots. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D206534
2024-04-04 20:17:26 +00:00
Niklas Baumgardner
6e8c7cb8ac Bug 1889473 - Do not scroll when focusing screenshots buttons. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D206549
2024-04-04 20:06:35 +00:00
Niklas Baumgardner
9639f49368 Bug 1864038 - Add keyboard shortcuts for screenshots overlay. r=sfoster,fluent-reviewers,bolsson,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D193847
2024-04-03 23:51:56 +00:00
Cristian Tuns
74d7116454 Backed out changeset d41d18cecc78 (bug 1864038) for causing bc failures in browser_screenshots_drag_scroll_test.js CLOSED TREE 2024-04-02 12:41:01 -04:00
Niklas Baumgardner
ad214075f8 Bug 1864038 - Add keyboard shortcuts for screenshots overlay. r=sfoster,fluent-reviewers,bolsson,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D193847
2024-04-02 15:53:57 +00:00
Norisz Fay
d358fd5803 Backed out changeset 13111643fbf4 (bug 1864038) for causing bc failures on browser_screenshots_drag_scroll_test.js CLOSED TREE 2024-04-02 05:04:20 +03:00
Niklas Baumgardner
f92101ac64 Bug 1864038 - Add keyboard shortcuts for screenshots overlay. r=sfoster,fluent-reviewers,bolsson,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D193847
2024-04-01 22:33:12 +00:00
Narcis Beleuzu
4519bb1532 Backed out changeset 4bcd94d558a6 (bug 1864038) for bc failure on browser_screenshots_drag_scroll_test.js 2024-04-01 17:29:08 +03:00
Niklas Baumgardner
a335bce89a Bug 1864038 - Add keyboard shortcuts for screenshots overlay. r=sfoster,fluent-reviewers,bolsson,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D193847
2024-04-01 13:51:16 +00:00
Niklas Baumgardner
f38a77bce9 Bug 1881506 - Handle all button clicks in screenshots overlay. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D204985
2024-03-25 20:55:13 +00:00
Niklas Baumgardner
324f0b83d2 Bug 1883717 - Correctly display screenshot size in overlay. r=sfoster,firefox-desktop-core-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D204946
2024-03-25 20:35:03 +00:00
Niklas Baumgardner
fd2d28e65c Bug 1883765 - Screenshots direction should match browser direction. r=sfoster,Itiel
Differential Revision: https://phabricator.services.mozilla.com/D205338
2024-03-25 13:40:39 +00:00
Niklas Baumgardner
52945e7e84 Bug 1883678 - Dispatch screenshots events to chrome only. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D203631
2024-03-05 18:52:34 +00:00
Niklas Baumgardner
864528da90 Bug 1874026 - Be careful not to draw screenshots overlay outside document. r=sfoster,desktop-theme-reviewers,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D198467
2024-02-14 15:16:12 +00:00
Niklas Baumgardner
0aaf858381 Bug 1791086 - Select elements within iframes in screenshots. r=sfoster,mconley
Differential Revision: https://phabricator.services.mozilla.com/D195165
2024-02-09 22:02:51 +00:00
Niklas Baumgardner
f1107e1471 Bug 1878141 - Move focus by key in screenshots. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D200381
2024-02-06 14:37:21 +00:00
Iulian Moraru
195daa2f17 Backed out changeset 4726abbc0c2c (bug 1874026) for causing multiple frequent bc failures. CLOSED TREE 2024-02-02 21:23:59 +02:00
Niklas Baumgardner
a92af79c95 Bug 1874026 - Be careful not to draw screenshots overlay outside document. r=sfoster,desktop-theme-reviewers,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D198467
2024-02-02 14:16:53 +00:00
Niklas Baumgardner
46edc28b3e Bug 1874380 - Fix HCM for screenshots initial state. r=sfoster,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D198868
2024-02-01 22:10:12 +00:00
Cristian Tuns
8aafec1a6c Backed out changeset e1b248076131 (bug 1874026) for causing bc failures in browser_test_resize.js CLOSED TREE 2024-01-30 17:16:32 -05:00
Niklas Baumgardner
a37d45e1b7 Bug 1874026 - Be careful not to draw screenshots overlay outside document. r=sfoster,desktop-theme-reviewers,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D198467
2024-01-30 21:30:04 +00:00
Niklas Baumgardner
aca7845a56 Bug 1867644 - Focus last used button for screenshots UI. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D197348
2024-01-19 22:08:30 +00:00
Stanca Serban
a56fab1284 Backed out changeset 9df2731a0530 (bug 1867644) for causing mochitests failures in browser_contentAltClick.js on OSX. CLOSED TREE 2024-01-20 03:59:49 +02:00
Niklas Baumgardner
c922147937 Bug 1867644 - Focus last used button for screenshots UI. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D197348
2024-01-19 22:08:30 +00:00
Natalia Csoregi
5fd68dd6cb Backed out changeset c6a30d94edf2 (bug 1867644) for causing failures on browser_screenshots_drag_test.js. CLOSED TREE 2024-01-19 03:46:03 +02:00
Niklas Baumgardner
0c9ea25838 Bug 1867644 - Focus last used button for screenshots UI. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D197348
2024-01-19 00:07:46 +00:00
Iulian Moraru
c2befb5de7 Backed out changeset 2b70f662a797 (bug 1867644) for causing bc failures on browser_overlay_keyboard_test.js. CLOSED TREE 2024-01-18 22:14:11 +02:00
Niklas Baumgardner
fbd83453f3 Bug 1867644 - Focus last used button for screenshots UI. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D197348
2024-01-18 17:47:54 +00:00
Niklas Baumgardner
8537612432 Bug 1873977 - Reset hover element region when retrying screenshot. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D198202
2024-01-17 16:17:42 +00:00
Niklas Baumgardner
6fedd4b29e Bug 1873882 - Canceling screenshots selected state should go to crosshairs state. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D198468
2024-01-17 01:18:08 +00:00
Niklas Baumgardner
10e944bf30 Bug 1872764 - Screenshots should always get events. r=sfoster,emilio
Differential Revision: https://phabricator.services.mozilla.com/D197802
2024-01-12 02:24:43 +00:00
Niklas Baumgardner
d4aaf4bd0c Bug 1801954 - Make screenshots selection movable via the keyboard. r=sfoster,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D192109
2023-12-01 16:07:25 +00:00
Stanca Serban
7b0cb90122 Backed out changeset 87051213c0bc (bug 1801954) for causing mochitests failures in browser_overlay_keyboard_test.js and on OSX. CLOSED TREE 2023-12-01 03:44:32 +02:00
Niklas Baumgardner
9d29449b10 Bug 1801954 - Make screenshots selection movable via the keyboard. r=sfoster,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D192109
2023-11-30 22:11:53 +00:00
Niklas Baumgardner
9c82fcdb22 Bug 1864889 - Only allow left mouse button on screenshots overlay. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D193680
2023-11-28 02:33:17 +00:00
Niklas Baumgardner
31d21cfa94 Bug 1842037 - Update screenshots telemetry. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D191679
2023-11-14 15:57:46 +00:00