feat: keyboard shortcuts for approvals (#869)

* wip

* cmd click shortcut to deny approval

* cleaner type

* show percentage in progress bar

* improve structure of PendingApprovalComponent

* enter to approve request

* disable kanban scope

* fix approval scope selection
This commit is contained in:
Gabriel Gordon-Hall
2025-09-30 11:40:34 +01:00
committed by GitHub
parent 23243dda7a
commit 6727e2dbb9
7 changed files with 420 additions and 202 deletions

View File

@@ -4,6 +4,7 @@ export enum Scope {
KANBAN = 'kanban',
PROJECTS = 'projects',
EDIT_COMMENT = 'edit-comment',
APPROVALS = 'approvals',
}
export enum Action {
@@ -19,6 +20,8 @@ export enum Action {
SHOW_HELP = 'show_help',
TOGGLE_FULLSCREEN = 'toggle_fullscreen',
DELETE_TASK = 'delete_task',
APPROVE_REQUEST = 'approve_request',
DENY_APPROVAL = 'deny_approval',
}
export interface KeyBinding {
@@ -148,6 +151,22 @@ export const keyBindings: KeyBinding[] = [
description: 'Delete selected task',
group: 'Task Details',
},
// Approval actions
{
action: Action.APPROVE_REQUEST,
keys: 'enter',
scopes: [Scope.APPROVALS],
description: 'Approve pending approval request',
group: 'Approvals',
},
{
action: Action.DENY_APPROVAL,
keys: ['meta+enter', 'ctrl+enter'],
scopes: [Scope.APPROVALS],
description: 'Deny pending approval request',
group: 'Approvals',
},
];
/**