[PR #10550] Add the 'Add new' button to the Actions page #28111

Open
opened 2026-01-31 09:26:25 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/10550

State: closed
Merged: Yes


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 ignore OldKeys and OldActionName 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

  • Cancel:
    • Deletes the action (because it doesn't truly exist until you confirm changes)
  • Accept:
    • Adds the new action.
    • If you attempt to edit it, the delete button is back.
  • Add Action:
    • Delete button should not be visible (redundant with 'Cancel')
    • Action should be initialized to a value
    • Key chord should be empty
    • Cannot add another action if a newly added action exists
  • Keyboard interaction:
    • escape --> cancel
    • enter --> accept
  • Accessibility:
    • "add new" button has a name
  • Interaction with other key bindings:
    • editing another action --> delete the "newly added" action (it hasn't been added yet)
    • only one action can be edited at a time
**Original Pull Request:** https://github.com/microsoft/terminal/pull/10550 **State:** closed **Merged:** Yes --- ## 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 ignore `OldKeys` and `OldActionName` 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 - Cancel: - Deletes the action (because it doesn't truly exist until you confirm changes) - Accept: - Adds the new action. - If you attempt to edit it, the delete button is back. - Add Action: - Delete button should not be visible (redundant with 'Cancel') - Action should be initialized to a value - Key chord should be empty - Cannot add another action if a newly added action exists - Keyboard interaction: - escape --> cancel - enter --> accept - Accessibility: - "add new" button has a name - Interaction with other key bindings: - editing another action --> delete the "newly added" action (it hasn't been added yet) - only one action can be edited at a time
claunia added the pull-request label 2026-01-31 09:26:25 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28111