ContextMenus should show keyboard shortcuts
The old debugger used to show keyboard shortcuts. It would be nice to have this behavior as well as it's a good education
New Debugger
Old Debugger
If the acceltext attribute is set on the <menuitem> then it will print it out with native styling. For instance, acceltext="⌘P". However, in order for this to happen automatically the menuitem has to have a key attribute pointing to a xul key.
The acceltext could potentially be generated explicitly via ShortcutUtils.jsm from a <key> element, and the old debugger does do that for things like tooltips. If we want to avoid using <key> elements altogether then we could modify that module a bit to accept metadata.
How do we do keyboard shortcut handling in the debugger, again?
We use key-shortcuts via a shortcuts context: https://github.com/devtools-html/debugger.html/blob/master/src/components/Editor/index.js#L207
OK, and how is the menu that ultimately calls onToggleBreakpoint constructed?
I think I'd modify KeyShortcuts.stringify function to more closely match ShortcutUtils.prettifyShortcut, and then manually set the acceltext to that value whenever the menuitem is created
/claim
Thanks for claiming the issue! :wave:
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
/unclaim
Done :+1:
/claim
Thanks for claiming the issue! :wave:
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
@lukaszsobek I'm un-assigning you as it's been two weeks and this is a panel bug. Feel free to re-claim
This potentially is not that important in comparison to other things, but I've been wanting this forever. I'm sure I made other issues for this also. But I seem to remember there was something blocking it.. Anyways, claiming it.
/claim
Thanks for claiming the issue! :wave:
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
I should have a PR for the Panel by tomorrow