Skip to content

NavyaAilaS225272001/fix/messages-keyboard-shortcuts - #503

Open
NavyaAila wants to merge 4 commits into
mainfrom
Messages.jsx_KeyboardShortcuts_Navya
Open

NavyaAilaS225272001/fix/messages-keyboard-shortcuts#503
NavyaAila wants to merge 4 commits into
mainfrom
Messages.jsx_KeyboardShortcuts_Navya

Conversation

@NavyaAila

Copy link
Copy Markdown
Collaborator

Added keyboard shortcuts for search, filter actions, and message deletion. Indicator is also there for available shortcuts.

Added keyboard shortcuts for search, filter actions, and message deletion. Included a visual indicator for available shortcuts.
@NavyaAila
NavyaAila requested a review from Krisha190235 August 15, 2026 13:30
@NavyaAila NavyaAila self-assigned this Aug 15, 2026
@NavyaAila NavyaAila added the enhancement New feature or request label Aug 15, 2026
@NavyaAila

Copy link
Copy Markdown
Collaborator Author
image image image

@NavyaAila NavyaAila changed the title Implement keyboard shortcuts and indicator component NavyaAilaS225272001/fix/messages-keyboard-shortcuts Aug 15, 2026
@Krisha190235

Copy link
Copy Markdown
Collaborator

Nice idea, and the shortcuts hint bar is a good touch. A few things to rework before merge, though:

The hook drives everything through the DOM — querySelectorAll('button') + textContent === 'Cancel'/'Delete' + .click(), and querySelector('input[placeholder*="Type a name"]'). That's fragile (breaks on any label/placeholder change or i18n) and this component already has the real handlers to call. Could we:

Use a ref on the search input instead of a placeholder query.
Call handleApplyFilters / handleClearFilters / openDeleteConfirm / closeDeleteConfirm directly rather than finding and clicking DOM buttons. (onDeleteSelected is currently passed in but never used — the Delete path scrapes the DOM instead.)
Reconsider the Delete shortcut — hasSelectedMessage just means "an active message exists," so Delete targets the first row arbitrarily, which is risky for a destructive action. I'd either drop it or wire it to a real selected row.
Esc likely duplicates the Modal's built-in close — worth confirming.

Happy to re-review once it's using refs/handlers instead of DOM scraping. A short clip of the shortcuts working would be great as evidence too.

@NavyaAila

Copy link
Copy Markdown
Collaborator Author

Thank you for the quick review, i have gone ahead and implemented the changes and included a clip showing the shortcuts are working in the message page. Could you please review it and approve the PR. Thank you!
PR503.zip

@NavyaAila

Copy link
Copy Markdown
Collaborator Author

CTRL + SHIFT + F to highlight the Sender Fields
image
CTRL + ENTER
image
Command activates the filter
image
CTRL + BACKSPACE
image
Filters cleared:
image
Delete confirmation:
image
Clicking ESC will remove the prompt and will not delete
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants