Skip to content
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

feature/add keybord shortcut to extension tabs #152

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## General

- Allow navigation to the extension tabs (Object, Users, Shortcuts) using keyboard [issue 135](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/135) (issue by [Sarath Addanki](https://github.com/asknet))
- Update query on EntityDefinition to avoid missing objects for large orgs [issue 138](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/138) (issue by [AjitRajendran](https://github.com/AjitRajendran))
- Add 'LIMIT 200' when selecting 'FIELDS(' in autocomplete [issue 146](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/146) )
- Change method to get extension id to be compatible with firefox [issue 137](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/137) (issue by [kkorynta](https://github.com/kkorynta))
Expand Down
19 changes: 15 additions & 4 deletions addon/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,18 @@ class App extends React.PureComponent {
if (e.key == "h" && this.refs.homeBtn) {
this.refs.homeBtn.click();
}
//TODO: Add shortcut for "u to go to user aspect"
if (e.key == "o") {
e.preventDefault();
this.refs.showAllDataBox.refs.objectTab.click();
}
if (e.key == "u") {
e.preventDefault();
this.refs.showAllDataBox.refs.userTab.click();
}
if (e.key == "s") {
e.preventDefault();
this.refs.showAllDataBox.refs.shortcutTab.click();
}
}
onChangeApi(e) {
localStorage.setItem("apiVersion", e.target.value + ".0");
Expand Down Expand Up @@ -445,9 +456,9 @@ class AllDataBox extends React.PureComponent {
return (
h("div", { className: "slds-p-top_small slds-p-horizontal_x-small slds-p-bottom_x-small slds-border_bottom" + (this.isLoading() ? " loading " : "") },
h("ul", { className: "small-tabs" },
h("li", { onClick: this.onAspectClick, "data-aspect": this.SearchAspectTypes.sobject, className: (activeSearchAspect == this.SearchAspectTypes.sobject) ? "active" : "" }, "Objects"),
h("li", { onClick: this.onAspectClick, "data-aspect": this.SearchAspectTypes.users, className: (activeSearchAspect == this.SearchAspectTypes.users) ? "active" : "" }, "Users"),
h("li", { onClick: this.onAspectClick, "data-aspect": this.SearchAspectTypes.shortcuts, className: (activeSearchAspect == this.SearchAspectTypes.shortcuts) ? "active" : "" }, "Shortcuts")
h("li", { ref: "objectTab", onClick: this.onAspectClick, "data-aspect": this.SearchAspectTypes.sobject, className: (activeSearchAspect == this.SearchAspectTypes.sobject) ? "active" : "" }, h("span", {}, h("u", {}, "O"), "bjects")),
h("li", { ref: "userTab", onClick: this.onAspectClick, "data-aspect": this.SearchAspectTypes.users, className: (activeSearchAspect == this.SearchAspectTypes.users) ? "active" : "" }, h("span", {}, h("u", {}, "U"), "sers")),
h("li", { ref: "shortcutTab", onClick: this.onAspectClick, "data-aspect": this.SearchAspectTypes.shortcuts, className: (activeSearchAspect == this.SearchAspectTypes.shortcuts) ? "active" : "" }, h("span", {}, h("u", {}, "S"), "hortcuts"))
),

(activeSearchAspect == this.SearchAspectTypes.sobject)
Expand Down