[PR #3830] [MERGED] User interface shortcuts system #6270

Closed
opened 2026-02-05 10:28:09 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3830
Author: @ssddanbrown
Created: 11/4/2022
Status: Merged
Merged: 11/10/2022
Merged by: @ssddanbrown

Base: developmentHead: shortcuts


📝 Commits (8)

  • b4cb375 Started implementation of UI shortcuts system
  • 78b6450 Distributed shortcut actions to common ui elements
  • 1fc9941 Improved shortcut overlay with related action highlighting
  • 66c8809 Started interface user shortcut form interface
  • 9067902 Added shortcut input controls to make custom shortcuts work
  • 24a7e85 Added tests to cover shortcut endpoints
  • a3fcc98 Aligned user preference endpoints in style and behaviour
  • 737904f Extracted shortcut text to language files

📊 Changes

36 files changed (+658 additions, -113 deletions)

View changed files

📝 app/Auth/UserRepo.php (+3 -0)
📝 app/Config/setting-defaults.php (+2 -0)
📝 app/Http/Controllers/UserPreferencesController.php (+43 -39)
📝 app/Settings/SettingService.php (+12 -0)
app/Settings/UserShortcutMap.php (+82 -0)
resources/icons/shortcuts.svg (+1 -0)
📝 resources/js/components/code-editor.js (+1 -1)
📝 resources/js/components/index.js (+4 -0)
resources/js/components/shortcut-input.js (+57 -0)
resources/js/components/shortcuts.js (+164 -0)
📝 resources/lang/en/common.php (+3 -0)
resources/lang/en/preferences.php (+18 -0)
📝 resources/sass/_components.scss (+28 -0)
📝 resources/sass/_forms.scss (+6 -0)
📝 resources/views/books/index.blade.php (+1 -1)
📝 resources/views/books/show.blade.php (+7 -7)
📝 resources/views/chapters/show.blade.php (+7 -7)
📝 resources/views/common/dark-mode-toggle.blade.php (+1 -1)
📝 resources/views/common/header.blade.php (+15 -8)
📝 resources/views/common/sort.blade.php (+1 -1)

...and 16 more files

📄 Description

Closes #1216

TODO

  • Allow custom key maps
  • Allow turning off shortcuts
  • Remove console.* lines in shortcuts.js
  • Align existing preference routes
  • Add user menu option to shortcuts form,
  • Look to set permissions on routes?
  • Extract text to language files
    • Including added shortcuts labels.
  • Test added routes/views/settings

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3830 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 11/4/2022 **Status:** ✅ Merged **Merged:** 11/10/2022 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `shortcuts` --- ### 📝 Commits (8) - [`b4cb375`](https://github.com/BookStackApp/BookStack/commit/b4cb375a02d2c81ac72ce9002d9f9ee2ab7f3922) Started implementation of UI shortcuts system - [`78b6450`](https://github.com/BookStackApp/BookStack/commit/78b645003187d0c709de0accf0e435e064400805) Distributed shortcut actions to common ui elements - [`1fc9941`](https://github.com/BookStackApp/BookStack/commit/1fc994177f92ade173d43c30be735cf11cb40f88) Improved shortcut overlay with related action highlighting - [`66c8809`](https://github.com/BookStackApp/BookStack/commit/66c8809799611a729a39b7d31d7b1e41f286201c) Started interface user shortcut form interface - [`9067902`](https://github.com/BookStackApp/BookStack/commit/906790226701c99aede853b0ff46bd1998b40aa0) Added shortcut input controls to make custom shortcuts work - [`24a7e85`](https://github.com/BookStackApp/BookStack/commit/24a7e8500d71927e0a63b89f0a97601965f2357c) Added tests to cover shortcut endpoints - [`a3fcc98`](https://github.com/BookStackApp/BookStack/commit/a3fcc98d6ec2597a212b569898437d3d2d9421bd) Aligned user preference endpoints in style and behaviour - [`737904f`](https://github.com/BookStackApp/BookStack/commit/737904fa63e62066e52588cfe731bac41f4aae1f) Extracted shortcut text to language files ### 📊 Changes **36 files changed** (+658 additions, -113 deletions) <details> <summary>View changed files</summary> 📝 `app/Auth/UserRepo.php` (+3 -0) 📝 `app/Config/setting-defaults.php` (+2 -0) 📝 `app/Http/Controllers/UserPreferencesController.php` (+43 -39) 📝 `app/Settings/SettingService.php` (+12 -0) ➕ `app/Settings/UserShortcutMap.php` (+82 -0) ➕ `resources/icons/shortcuts.svg` (+1 -0) 📝 `resources/js/components/code-editor.js` (+1 -1) 📝 `resources/js/components/index.js` (+4 -0) ➕ `resources/js/components/shortcut-input.js` (+57 -0) ➕ `resources/js/components/shortcuts.js` (+164 -0) 📝 `resources/lang/en/common.php` (+3 -0) ➕ `resources/lang/en/preferences.php` (+18 -0) 📝 `resources/sass/_components.scss` (+28 -0) 📝 `resources/sass/_forms.scss` (+6 -0) 📝 `resources/views/books/index.blade.php` (+1 -1) 📝 `resources/views/books/show.blade.php` (+7 -7) 📝 `resources/views/chapters/show.blade.php` (+7 -7) 📝 `resources/views/common/dark-mode-toggle.blade.php` (+1 -1) 📝 `resources/views/common/header.blade.php` (+15 -8) 📝 `resources/views/common/sort.blade.php` (+1 -1) _...and 16 more files_ </details> ### 📄 Description Closes #1216 ### TODO - [x] Allow custom key maps - [x] Allow turning off shortcuts - [x] Remove console.* lines in shortcuts.js - [x] Align existing preference routes - [x] Add user menu option to shortcuts form, - [x] ~~Look to set permissions on routes?~~ - [x] Extract text to language files - Including added shortcuts labels. - [x] Test added routes/views/settings --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:28:09 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6270