Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Allow setting the action on Actions page #10220
Allow setting the action on Actions page #10220
Changes from 5 commits
c3568ac
53ff37c
1453376
e262055
652650b
a159fb8
9b896ce
3499a72
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
attemptSetAction
is always called whenattemptRebindKeys
is.You can just merge the two lambdas into one.
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.
Yup! I really only separated them out so that it's easier to read. I'm down to combine them, but I'm still worried about readability. Would something like this be clear maybe?
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.
Question: do we also want to display a warning for something like "this action already has a keybinding, are you sure you want to add another?"
I know having multiple keybindings for an action is totally fine and not really 'conflicting', but with the long list of actions we currently show it might be easy for a user to miss that they've already set a keybinding for an action but forgot about it
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.
Totally okay with having this be a follow-up or a "wait until someone asks for it before we implement it" kinda thing, just wanted to know if it's been discussed already
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.
I don't understand this description... Why can it disagree with the settings model? And why does the combo box item map to a settings model value? The way I understand the code,
CurrentAction
is the actual action identifier/name.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.
Really it's because we have the "cancel"/"ok" system (aka the "edit mode" system).
CurrentAction
serves as...ProposedAction
to on a cancellationProposedAction
and the settings modelIf we got rid of the "edit mode" system, we don't have to worry about (1) anymore. To get rid of (2),
KeyBindingViewModel
would need a reference to theActionMap
. But even then, I think it's better to keep theActionMap
reference at a higher layer so that we can identify conflicting key bindings and key chords before editing the settings model. I think that's a better separation of responsibilities imo.