New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor ActionMap and Command to use ActionIDs #17162
base: main
Are you sure you want to change the base?
Conversation
{ | ||
if (cmd.ActionAndArgs().Action() != ShortcutAction::Invalid) | ||
// Only populate AvailableActions with actions that haven't been visited already. | ||
const auto actionID = Hash(cmd.ActionAndArgs()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately we still have to use InternalActionID
to populate the available action dropdown in the SUI since we don't have a Terminal.<>
id for every configuration of each shortcut action and its args
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits, and 1 bug.
I'm not sure I understood how all the changes fit together in the grand scheme of things. I'm not so deep into the ActionMap code. 🙈
else | ||
{ | ||
// this is not a command block, so it is a keybinding block | ||
_AddKeyBindingHelper(jsonBlock, warnings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you invert the if condition, you can flip the branches and use continue
here. It would still make sense that way IMO, because it would read "if it has no commands and no actions, then add an error and continue".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not adding errors here, we're either adding a keybinding or adding an action (that may have a keybinding in it if it is the legacy style)
|
Summary of the Pull Request
As outlined in #16816, refactor
ActionMap
to use the new action IDs added in #16904Detailed description of the pull request
See the spec!
Validation steps performed
References and Relevant Issues
#16816
PR Checklist