[feat]: Add keyboard shortcut to open Show All Data for current record#1192
Open
RubenHalman wants to merge 6 commits into
Open
[feat]: Add keyboard shortcut to open Show All Data for current record#1192RubenHalman wants to merge 6 commits into
RubenHalman wants to merge 6 commits into
Conversation
Adds an open-show-all-data command with default shortcut Ctrl+Shift+I (Cmd+Shift+I on Mac). Handled directly in popup.js using existing getRecordId/getSobject context — no logic duplication in button.js. Fixes tprouvot#917
…eserved shortcuts)
5 tasks
|
Hi @RubenHalman, not sure if I'm testing this correctly but I'm receiving this error when testing the keyboard shortcut. Reproduce -
Also I noticed the show all data tab is opening multiple times - sometimes 3 or 4 duplicate tabs when I use the shortcut.
|
…e tabs Move shortcut handling out of popup.js (where it fired on every open Salesforce tab due to chrome.runtime.sendMessage broadcast) into background.js. Uses chrome.tabs.query to get the active tab and the existing cookie-based sfHost resolution, then opens inspect.html directly via chrome.tabs.create — no broadcast involved.
Contributor
Author
|
Hi @ChrisBurns0000, thanks for testing and flagging this! Just pushed a fix — the shortcut now opens a single tab regardless of how many Salesforce tabs you have open. With regards to the error in the image, I did not experience this, but I will take a look |
Contributor
Author
|
I looked at this but I think its resolved as part of another Bug, can you try again @ChrisBurns0000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #917
Summary
open-show-all-datacommand tomanifest.json(Chrome/Edge) andmanifest-firefox.json(Firefox) so it appears in extension shortcut settingsCtrl+Shift+Ion Windows/Linux,Cmd+Shift+Ion Mac (configurable by the user)popup.jsusing the existinggetRecordId/getSobjectcontext — no logic duplicated intobutton.jsinspect.htmlfor the current record directly, including objectType when availableHow it works
When the shortcut fires,
background.jssendsshortcut_pressedwithcommand: "open-show-all-data". TheAppcomponent inpopup.jslistens for this viachrome.runtime.onMessageand opens the inspect page using the already-knowncontextUrlstate — the same URL the popup uses to detect the current record.Testing
Cmd+Shift+I(Mac) orCtrl+Shift+I(Windows/Linux)Checklist