You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The next/previous record chevrons on the record page are great (they keep the active tab and respect the view's filters), but they're mouse-only. For sequential workflows, like an operator reviewing hundreds of records in a filtered view, a keyboard shortcut would be a big quality-of-life win.
The foundations seem to already be there: navigateToNext/PreviousRecord are standard command menu items with a hotKeys field (and updateCommandMenuItem even accepts it), but nothing registers those keys as actual hotkeys yet. Only /, @ and Ctrl+K are hard-coded in useCommandMenuHotKeys.
Minimal implementation as far as I can tell:
On the record show page, register something like useGlobalHotkeys({ keys: ['ctrl+up', 'ctrl+down', 'meta+up', 'meta+down'], options: { enableOnFormTags: false } }) and call navigateToPreviousRecord / navigateToNextRecord from the existing useRecordShowPagePagination hook.
(Bonus, later) Generalize by registering the hotKeys of pinned command menu items in one useGlobalHotkeys call and dispatching on the matched key. That would make every command's shortcut workspace-customizable through updateCommandMenuItem, which already accepts the field.
Happy to contribute a PR if you prefer. Thanks! (Self-hosted v2.22.0)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi Twenty team,
The next/previous record chevrons on the record page are great (they keep the active tab and respect the view's filters), but they're mouse-only. For sequential workflows, like an operator reviewing hundreds of records in a filtered view, a keyboard shortcut would be a big quality-of-life win.
The foundations seem to already be there: navigateToNext/PreviousRecord are standard command menu items with a hotKeys field (and updateCommandMenuItem even accepts it), but nothing registers those keys as actual hotkeys yet. Only /, @ and Ctrl+K are hard-coded in useCommandMenuHotKeys.
Minimal implementation as far as I can tell:
Happy to contribute a PR if you prefer. Thanks! (Self-hosted v2.22.0)
All reactions