80266[FEATURE] Add hotkey API to TYPO3 backend
Commit message
Review
-
Code review CR +2 Done
- Andreas Kienast +2
- Christian Kuhn +1
- Benni Mack +1
-
Verified V +2 Done
- Andreas Kienast +2
- Christian Kuhn +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 11
- Build/Sources/TypeScript/backend/hotkeys/hotkey-storage.tsnew+61 −0
- Build/Sources/TypeScript/backend/live-search/live-search-shortcut.ts+6 −18
- Build/Sources/TypeScript/backend/form-engine.ts+14 −0
- Build/Sources/TypeScript/backend/hotkeys.ts2new+216 −0
- Build/types/TYPO3/index.d.ts3+2 −0
- typo3/sysext/backend/Classes/Controller/BackendController.php+3 −0
- typo3/sysext/backend/Resources/Public/JavaScript/hotkeys/hotkey-storage.jsnew+13 −0
- typo3/sysext/backend/Resources/Public/JavaScript/live-search/live-search-shortcut.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/hotkeys.jsnew+13 −0
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-101507-HotkeyAPI.rst5new+70 −0
Review log 5477
Show 3652 earlier messages
-
Andreas Kienast uploaded patch set 1 07/31/23, 09:23
-
core-ci voted on patch set 1 V +1 07/31/23, 09:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44788
-
Andreas Kienast uploaded patch set 2
V +107/31/23, 10:34 -
core-ci voted on patch set 2 V +1 07/31/23, 10:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44799
-
Andreas Kienast uploaded patch set 3
V +107/31/23, 11:55 -
core-ci voted on patch set 3 V +1 07/31/23, 12:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44809
-
Andreas Kienast uploaded patch set 4
V +107/31/23, 12:37 -
core-ci voted on patch set 4 V +1 07/31/23, 12:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44816
-
Andreas Kienast uploaded patch set 5
V +107/31/23, 13:30 -
Mathias Brodala commented on patch set 5 CR -1 07/31/23, 13:39
Feature-101507-HotkeyAPI.rst:34This should be "allowOnEditables" and "false" by default. We should try to avoid enabling something to disable something like TYPO3 did in its history. -
core-ci voted on patch set 5 V +1 07/31/23, 13:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44818
-
Andreas Kienast commented on patch set 5 07/31/23, 13:53
Feature-101507-HotkeyAPI.rst:24ReplyCtrl+D won‘t trigger a hotkey that listens to „D“ only, this is caught already. I agree on the documentation part.Feature-101507-HotkeyAPI.rst:34ReplyAck -
Andreas Kienast uploaded patch set 6
CR -1V +107/31/23, 14:26 -
Andreas Kienast commented on patch set 6 07/31/23, 14:27
Feature-101507-HotkeyAPI.rst:24ReplyDone -
core-ci voted on patch set 6 V +1 07/31/23, 14:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44824
-
Simon Schaufelberger commented on patch set 6 CR -1 07/31/23, 20:41
index.d.ts:14this is not sorted alphabetically. can this be done? -
Simon Schaufelberger commented on patch set 6 08/01/23, 01:36
I would also add "?" as hot key and show a modal with an overview over all hot keys. -
Mathias Brodala commented on patch set 6 08/01/23, 07:15
Reply
Sounds like a good idea but should be done separately IMO to keep this one small. -
Andreas Kienast commented on patch set 6 08/01/23, 07:30
index.d.ts:14ReplyOf course I can solve this issue. -
Andreas Kienast uploaded patch set 7
CR -1V +108/01/23, 07:30 -
Andreas Kienast commented on patch set 7 08/01/23, 07:31
Reply
Since the limitation mentioned in the ReST is currently in place, this cannot be done in a sane way. Will be done at a later point. -
core-ci voted on patch set 7 V +1 08/01/23, 07:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44848
-
Andreas Kienast commented on patch set 7 08/01/23, 07:54
index.d.ts:14ReplyDone -
Simon Schaufelberger voted on patch set 7 CR +1 08/01/23, 14:56
-
Andreas Kienast uploaded patch set 8
CR +1V +108/02/23, 12:57 -
Andreas Kienast commented on patch set 8 CR -1 08/02/23, 13:01
Will rework the scoping stuff a bit to allow setting the scope automatically. -
core-ci voted on patch set 8 V +1 08/02/23, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44890
-
Andreas Kienast uploaded patch set 9
CR -1V +108/02/23, 13:50 -
core-ci voted on patch set 9 V +1 08/02/23, 13:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44893
-
Andreas Kienast uploaded patch set 10
V +108/14/23, 11:22 -
core-ci voted on patch set 10 V +1 08/14/23, 11:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45479
-
Stefan Bürk voted on patch set 10 V +1 CR +1 08/15/23, 10:32
-
Andreas Kienast uploaded patch set 11
CR +1V +108/17/23, 11:36 -
core-ci voted on patch set 11 V +1 08/17/23, 11:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45577
-
Andreas Kienast uploaded patch set 12
V +109/05/23, 06:04 -
core-ci voted on patch set 12 V +1 09/05/23, 06:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46209
-
Garvin Hicking commented on patch set 12 09/05/23, 07:12
Very minor typo in docblock. Cool stuff! :)hotkeys.ts:30Typo, should be "switched"? -
Andreas Kienast uploaded patch set 13
V +109/05/23, 07:25 -
core-ci voted on patch set 13 V +1 09/05/23, 07:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46215
-
Stefan Bürk voted on patch set 13 V +1 CR +1 09/05/23, 09:09
-
Andreas Kienast uploaded patch set 14
CR +1V +109/07/23, 08:54 -
core-ci voted on patch set 14 V +1 09/07/23, 09:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46335
-
Andreas Kienast uploaded patch set 15
V +109/07/23, 10:45 -
core-ci voted on patch set 15 V +1 09/07/23, 10:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46345
-
Andreas Kienast commented on patch set 15 CR -1 09/12/23, 07:23
Perhaps we have to take accessibility into account as well (e.g `aria-keyshortcuts`). -
Andreas Kienast uploaded patch set 16
CR -1V +109/14/23, 06:14 -
core-ci voted on patch set 16 V +1 09/14/23, 06:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46559
-
Guido Schmechel commented on patch set 16 09/15/23, 20:37
I love this feature already. Tested with Win and Chrome 117. Everything fine. Registering a new key also worked. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-keyshortcuts aria-keyshortcuts seems to make sense and we should offer it. Do we actually need a kind of StopList for certain keys? "Don't override browser, assistive technology, or operating system shortcuts" In addition, it would also be optimal to see the registered hotkeys + scope somewhere. Maybe something for a follow-up patch and the configuration module. -
Andreas Kienast commented on patch set 16 09/16/23, 04:40
Reply
Thanks for testing the patch. A „stop list“ sounds nice but is not viable as this depends on the browser and the operating system. Also, TYPO3 uses such keystrokes: * Ctrl/Cmd+K usually focusses the address bar in at least Chrome, but this has a graceful fallback. * Ctrl/Cmd+S‘s behavior is completely useless in the backend, therefore it‘s fine to override it. Having the keystrokes listed somewhere is nice, but at least not in the configuration module as you can register multiple scopes, which is a pure runtime thing. I think, the topbar is *currently* the best location. -
Simon Schaufelberger commented on patch set 16 09/17/23, 08:48
Reply
@Guido: I already had the idea to add "?" as hot key and show a modal with an overview over all hot keys. -
Guido Schmechel commented on patch set 16 09/17/23, 08:58
Reply
Yes, I just saw your comment above. A follow-up patch would of course also be OK for me :-) This patch is purely about the API.
-
Andreas Kienast uploaded patch set 17
V +109/19/23, 13:53 -
Andreas Kienast uploaded patch set 18 09/19/23, 13:58
-
core-ci voted on patch set 18 V +1 09/19/23, 14:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46791
-
core-ci voted on patch set 17 V +1 09/19/23, 14:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46788
-
Andreas Kienast uploaded patch set 19
V +109/26/23, 12:37 -
core-ci voted on patch set 19 V +1 09/26/23, 12:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47185
-
Stefan Bürk commented on patch set 19 V +1 CR +1 09/26/23, 13:41
Would suggest to get a vote from some JS pros, for example Benjamin Franzke. For me this looks good codewise. I tested around, seems to work so far. Could not get any error messages in the console or saw anything broken. -
Garvin Hicking voted on patch set 19 V +1 CR +1 10/16/23, 06:55
-
Benni Mack commented on patch set 19 V -1 10/16/23, 06:59
I told a11y team to give a review (that was 1 month ago). Let's wait until End of october before merging pls - if they don't respond by then, we'll continue. -
Andreas Kienast commented on patch set 19 10/31/23, 06:07
Looks like something changed under the hood. Consecutive Ctrl+S in FormEngine doesn't work anymore after rebase. Investigating... -
Andreas Kienast uploaded patch set 20
CR +1V +110/31/23, 06:24 -
core-ci voted on patch set 20 V +1 10/31/23, 06:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48379
-
Patrick Schriner commented on patch set 20 11/06/23, 10:57
Someone mentioned that this could be an accessibility improvement; but two questions remain: if I understand the code correctly, the hotkeys are not really configurable (without heavy javascript). I don't see a possibility to unregister a hotkey either. If the chosen hotkeys interfere with hotkeys used by (common) screen readers, this would probably be worse than before? -
Andreas Kienast commented on patch set 20 11/06/23, 11:53
Reply
> the hotkeys are not really configurable You mean on a user-basis? That's correct, that's not intended on purpose to have a consistent behavior across several installations. Same goes for de-registration. > If the chosen hotkeys interfere with hotkeys used by (common) screen readers, this would probably be worse than before? I was under the impression that screen readers register shortcuts mutually exclusive, so browser JS cannot intercept the same shortcuts. Also, wouldn't this be an issue with literally any other software / website then as well? -
Patrick Schriner commented on patch set 20 11/06/23, 12:25
Reply
1) ok - I think having an api for de-registration would be no harm - just a point where someone with a legitimate interest could hook into to prevent conflicts 2) will check on that -
Andreas Kienast uploaded patch set 21
V +111/07/23, 08:42 -
core-ci voted on patch set 21 V +1 11/07/23, 08:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48679
-
Andreas Kienast rebased onto patch set 22
V +111/24/23, 09:49 -
core-ci voted on patch set 22 V +1 11/24/23, 10:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49861
-
Andreas Kienast uploaded patch set 23
V +111/27/23, 08:28 -
core-ci voted on patch set 23 V +1 11/27/23, 08:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49967
-
Benni Mack voted on patch set 23 CR +1 V +1 11/27/23, 08:44
-
Christian Kuhn voted on patch set 23 CR +1 V +1 11/27/23, 08:55
-
Andreas Kienast voted on patch set 23 CR +2 V +2 11/27/23, 09:27
-
Andreas Kienast merged patch set 24 11/27/23, 09:27
Feature-101507-HotkeyAPI.rst:24