Add keyboard shortcut help dialog to discover available shortcuts (? key)#68200
Add keyboard shortcut help dialog to discover available shortcuts (? key)#68200choo121600 wants to merge 6 commits into
Conversation
1bf713e to
cb89317
Compare
|
Interesting! I think we should get rid of the keyboard tooltip on the Grid view while we are at it then. |
bbovenzi
left a comment
There was a problem hiding this comment.
Final note. I think we should keep a json file of all the existing shortcuts in one place instead of the useShortcut building the list on render.
A single file source of truth will be much easier for maintainers to know what shortcuts already.
|
@bbovenzi Just to make sure I understand the suggestion correctly, are you primarily looking for:
The current implementation intentionally uses the live registry so the dialog only shows shortcuts that are actually available in the current context. |
The first one. I think having a single source of truth in the code would help with maintainability. We can have nested objects in the json block for global vs per page shortcuts though. |
79fe957 to
7740a25
Compare
|
How about keeping the catalog as a .ts file instead of JSON? Happy to switch to JSON if you'd prefer, though. |
|
An idea: Should the shortcut keys themselves also be localized/translated? |
|
Nit: should the shortcuts we show be scoped down to the current page? |
|
@choo121600 yes a ts file works for me. |
198fb34 to
6219251
Compare
6219251 to
a61bbdf
Compare
a61bbdf to
40028d1
Compare


Why
The UI includes many keyboard shortcuts, but there is currently no way to discover them.
This PR adds a help dialog that can be opened with ? and shows the shortcuts available on the current page, grouped by category.
How
Shortcuts register themselves when mounted, so the dialog always reflects the shortcuts that are actually available.
A thin
useShortcutwrapper arounduseHotkeysprovides this functionality without changing existing shortcut behaviour.Was generative AI tooling used to co-author this PR?
claude opus 4.8
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.