fix(spp_change_request_v2): remove global keyboard hotkeys#124
fix(spp_change_request_v2): remove global keyboard hotkeys#124
Conversation
Single-letter hotkeys (A, R, D, N, P) were interfering with normal typing. Removed global_shortcuts service and keydown handler from review panel.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where single-letter global hotkeys within the Odoo interface inadvertently triggered Change Request actions, disrupting normal text input. By completely removing these global and local keyboard shortcuts, the system now allows users to type without interference. All Change Request functionalities, such as approving, rejecting, or requesting changes, remain fully accessible through their respective on-screen buttons. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly removes the global keyboard hotkeys that were causing interference. The approach of removing the global_shortcuts.js service and the onKeydown handler in the review_panel component is sound. I have added one comment pointing out that the UI hints for these shortcuts should also be removed from the corresponding template to avoid user confusion.
I am having trouble creating individual review comments. Click here to see my feedback.
spp_change_request_v2/static/src/components/review_panel/review_panel.js (166-205)
While removing the keyboard handler logic is correct, the corresponding UI hints for these shortcuts still exist in the template file spp_change_request_v2/static/src/components/review_panel/review_panel.xml. These should also be removed to avoid confusing users. The hints are present on the action buttons (e.g., (A), (R)) and in a dedicated keyboard hints section at the bottom of the panel.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #124 +/- ##
========================================
Coverage 69.96% 69.97%
========================================
Files 832 835 +3
Lines 48813 49162 +349
========================================
+ Hits 34154 34399 +245
- Misses 14659 14763 +104
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Why is this change needed?
Single-letter global hotkeys (A=Approve, R=Request Changes, D=Decline, N=Next, P=Previous) were interfering with normal typing anywhere in the Odoo interface.
How was the change implemented?
global_shortcuts.jsservice entirely — it registered A, R, D as global hotkeys via Odoo's hotkey serviceonKeydownhandler fromreview_panel.js— it registered the same keys plus N, P, Escape viadocument.addEventListeneronWillUnmountimportNew unit tests
Unit tests executed by the author
How to test manually
Related links