Skip to content

[#153] Expand Alt+Number shortcuts for universal field navigation#8

Merged
sksingh2005 merged 1 commit into
mainfrom
tickets-shortcuts
May 30, 2026
Merged

[#153] Expand Alt+Number shortcuts for universal field navigation#8
sksingh2005 merged 1 commit into
mainfrom
tickets-shortcuts

Conversation

@sksingh2005

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a universal Alt+Number keyboard shortcut system across the frontend, covering both “open the Nth item” behavior on list pages and “jump to field/section” behavior on detail/form pages. It also extracts shared “editable target” detection into a utility and updates the user manual to document the new shortcut scheme.

Changes:

  • Added a reusable useNumberShortcuts hook for Alt+1…Alt+0 navigation + optional field-jump behavior via data-shortcut-index.
  • Wired the hook + data-shortcut-index attributes into many pages (tickets, companies, users, categories, levels, entitlements, articles).
  • Updated manual chapters to reflect the new shortcut behavior.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/frontend/src/utils/keyboard.ts New shared isEditableTarget helper extracted from components/pages.
src/frontend/src/hooks/useNumberShortcuts.ts New hook implementing Alt+Number shortcuts for list navigation and field jumps.
src/frontend/src/pages/SupportTicketsPage.tsx Replaced per-page Ctrl+Number handler with the shared shortcuts hook.
src/frontend/src/pages/SupportTicketDetailPage.tsx Enabled field-jump shortcuts + added data-shortcut-index markers for key sections/fields.
src/frontend/src/pages/SupportTicketCreatePage.tsx Enabled field-jump shortcuts + added indices to key inputs/selects/editors.
src/frontend/src/pages/TicketWorkbenchFormPage.tsx Enabled field-jump shortcuts + added indices to workbench form controls.
src/frontend/src/pages/CompaniesPage.tsx Enabled list item shortcuts (top 10).
src/frontend/src/pages/CompanyFormPage.tsx Enabled field-jump shortcuts + added indices to company form controls.
src/frontend/src/pages/DirectoryUsersPage.tsx Enabled list item shortcuts (top 10).
src/frontend/src/pages/DirectoryUserFormPage.tsx Enabled field-jump shortcuts + added indices to initial user fields.
src/frontend/src/pages/CategoriesPage.tsx Enabled list item shortcuts (top 10).
src/frontend/src/pages/CategoryFormPage.tsx Enabled field-jump shortcuts + added indices to key category fields.
src/frontend/src/pages/LevelsPage.tsx Enabled list item shortcuts (top 10).
src/frontend/src/pages/LevelFormPage.tsx Enabled field-jump shortcuts + added indices to key level fields.
src/frontend/src/pages/EntitlementsPage.tsx Enabled list item shortcuts (top 10).
src/frontend/src/pages/EntitlementsListPage.tsx Enabled list item shortcuts (top 10).
src/frontend/src/pages/EntitlementFormPage.tsx Enabled field-jump shortcuts + added indices to entitlement fields.
src/frontend/src/pages/ArticlesPage.tsx Enabled list item shortcuts (top 10).
src/frontend/src/pages/ArticleFormPage.tsx Enabled field-jump shortcuts + added indices to article fields.
src/frontend/src/components/layout/AuthenticatedHeader.tsx Switched to shared isEditableTarget utility.
src/frontend/src/components/editor/LexicalEditor.tsx Added support for passing data-shortcut-index into editor wrapper.
doc/manual/en/24-navigation.md Documented global behavior for Alt+Number navigation + Escape blur behavior.
doc/manual/en/11-tickets.md Updated ticket chapter to describe Alt+Number list + detail shortcuts.
doc/manual/en/15-companies.md Added keyboard shortcut section for company pages.
doc/manual/en/16-users.md Added keyboard shortcut section for user pages.
doc/manual/en/17-categories.md Added keyboard shortcut section for category pages.
doc/manual/en/18-entitlements.md Added keyboard shortcut section for entitlement pages.
doc/manual/en/19-levels.md Added keyboard shortcut section for levels pages.
doc/manual/en/09-articles.md Added keyboard shortcut section for article pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +42
const handleKeyDown = (event: KeyboardEvent) => {
// Allow Escape key to blur any active input
if (event.key === "Escape") {
if (document.activeElement instanceof HTMLElement) {
document.activeElement.blur();
}
return;
}

if (
event.defaultPrevented ||
!event.altKey ||
event.ctrlKey ||
event.metaKey
) {
return;
}
Comment on lines +404 to +408
<div
className="editor-shell bg-background overflow-hidden rounded-lg border shadow w-full"
data-shortcut-index={dataShortcutIndex}
tabIndex={dataShortcutIndex ? -1 : undefined}
>
<div className="space-y-4">
<h2
className="px-1 text-3xl font-bold tracking-tight"
className="px-1 text-3xl font-bold tracking-tight outline-none"
Comment thread doc/manual/en/19-levels.md Outdated
Comment on lines +60 to +64
* `Alt+2`: Jump to Description
* `Alt+3`: Jump to Business Hours
* `Alt+4`: Jump to SLA Name
* `Alt+5`: Jump to Resolve Time
* `Alt+6`: Jump to SLA Color
Comment thread doc/manual/en/15-companies.md Outdated
Comment on lines +65 to +69
* `Alt+2`: Jump to Domains
* `Alt+3`: Jump to Phone
* `Alt+4`: Jump to Location
* `Alt+5`: Jump to Note
* `Alt+6`: Jump to SLA Level
Comment thread doc/manual/en/17-categories.md Outdated
Comment on lines +56 to +58
* `Alt+1`: Jump to Name
* `Alt+2`: Jump to Entitlement
* `Alt+3`: Jump to Description
Comment thread doc/manual/en/16-users.md Outdated
Comment on lines +76 to +79
* `Alt+4`: Jump to Phone
* `Alt+5`: Jump to Role
* `Alt+6`: Jump to Company
* `Alt+7`: Jump to Title
Comment thread doc/manual/en/09-articles.md Outdated
Comment on lines +83 to +84
* `Alt+2`: Jump to Path
* `Alt+3`: Focus the Editor
Comment on lines 315 to 318
);
}}
data-shortcut-index="4"
/>
Comment on lines 444 to 449
}
: current,
);
}}
data-shortcut-index="5"
/>
@sksingh2005 sksingh2005 merged commit 976dae4 into main May 30, 2026
2 checks passed
@sksingh2005 sksingh2005 deleted the tickets-shortcuts branch June 15, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants