-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Analytics] Replace _execute_action
with Custom Command
#1799
Conversation
…ction has limited API capabilities)
_execute_action
with Custom Command for Analytics_execute_action
with Custom Command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any performance implications to always listening to chrome commands? Also, any need for other browser support?
i dont think it should have any performance implications since it's event-driven and only runs when a keyboard shortcut is pressed. I did assume firefox would work with this but i dont think it does. ill check / fix that today. |
Moved to WIP since e2e is failing as a side effect; maybe expecting different key registration |
Fixes BX-1625
What changed (plus any additional context for devs)
Currently our extension uses
_execute_action
for the Alt+Shift+R shortcut to open the popup. While functional, this reserved command doesn't dispatch any events we can hook into for analytics. From documentation:This PR replaces
_execute_action
with a standard command that checkscommand.onCommand
for the execution of this shortcut, and then runschrome.action.openPopup()
in ourbackground.js
service-worker script. This gives us identical popup opening behavior while allowing us to track shortcut usage through thecommand.onCommand
listener.The change does not affect users at all; the shortcut remains the same and popup opening performance is unchanged since we're using Chrome's native popup API.
What to test