-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Add the 'Add new' button to the Actions page #10550
Conversation
a543625
to
718b6b2
Compare
718b6b2
to
b1209ae
Compare
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.
Much clearer. Thanks. Looks good.
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.
okay i'm cool with this
@@ -1154,4 +1154,8 @@ | |||
<value>Edit</value> | |||
<comment>Text label for a button that can be used to begin making changes to a key binding entry.</comment> | |||
</data> | |||
<data name="Actions_AddNewTextBlock.Text" xml:space="preserve"> | |||
<value>Add new</value> |
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.
Perhaps this should be "Add new..."? eh, maybe not though. idc.
KeyChordSerialization::FromString(newKeyChordText), // NewKeys: Attempt to convert the provided key chord text | ||
_IsNewlyAdded ? hstring{} : _CurrentAction, // OldAction | ||
unbox_value<hstring>(_ProposedAction)) }; // | ||
_ModifyKeyBindingRequestedHandlers(*this, *args); |
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.
note: this is handled in Actions::_ViewModelModifyKeyBindingHandler
Hello @carlos-zamora! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
🎉 Handy links: |
Summary of the Pull Request
This adds the "add new" button to the actions page. It build on the work of #10220 by basically just adding a new list item to the top of the key binding list.
This also makes it so that if you click the "accept changes" button when you have an invalid key chord, we don't do anything.
References
#6900 - Actions page Epic
#9427 - Actions page design doc
#10220 - Actions page PR - set action
Detailed Description of the Pull Request / Additional comments
ModifyKeyBindingEventArgs
is used to introduce new key bindings. We just ignoreOldKeys
andOldActionName
because both didn't exist before.IsNewlyAdded
tracks if this is an action that was added, but has not been confirmed to add to the settings model.CancelChanges()
is directly bound to the cancel button. This allows us to delete the key binding when it's clicked on a "newly added" action.Validation Steps Performed