support key commands for sidebars

RESOLVED FIXED in Firefox 54

Status

()

Toolkit
WebExtensions: Frontend
P2
normal
RESOLVED FIXED
4 months ago
a month ago

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

Tracking

({dev-doc-complete})

49 Branch
mozilla54
dev-doc-complete
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

(Whiteboard: triaged)

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

4 months ago
ext-commands.js should support _execute_sidebar_action to support key bindings for a sidebar.
(Assignee)

Updated

3 months ago
Priority: -- → P2
Whiteboard: triaged
Comment hidden (mozreview-request)

Updated

3 months ago
Keywords: dev-doc-needed

Comment 2

3 months ago
mozreview-review
Comment on attachment 8836842 [details]
Bug 1338727 add command support for sidebar-action,

https://reviewboard.mozilla.org/r/112154/#review113902

::: browser/components/extensions/ext-commands.js:136
(Diff revision 1)
>        } else if (name == "_execute_browser_action") {
>          let win = event.target.ownerGlobal;
>          browserActionFor(this.extension).triggerAction(win);
> +      } else if (name == "_execute_sidebar_action") {
> +        let win = event.target.ownerGlobal;
> +        sidebarActionFor(this.extension).triggerAction(win);

Check that you actually get back a value here so this doesn't throw if this gets invoked in an extension that doesn't have a sidebar.
I guess we don't do the same for page action and browser action, that could get fixed too :-)

::: browser/components/extensions/test/browser/browser_ext_commands_execute_sidebar_action.js:45
(Diff revision 1)
> +    },
> +  });
> +
> +  yield extension.startup();
> +  yield SimpleTest.promiseFocus(window);
> +  // Since we didn't set useAddonManager, the sidebar will not be automatically

I don't get this, what does useAddonManager have to do with this?
Attachment #8836842 - Flags: review?(aswan) → review+
(Assignee)

Comment 3

3 months ago
mozreview-review-reply
Comment on attachment 8836842 [details]
Bug 1338727 add command support for sidebar-action,

https://reviewboard.mozilla.org/r/112154/#review113902

> Check that you actually get back a value here so this doesn't throw if this gets invoked in an extension that doesn't have a sidebar.
> I guess we don't do the same for page action and browser action, that could get fixed too :-)

This is also a problem with page and browser action.  I'll fix for all.

> I don't get this, what does useAddonManager have to do with this?

The sidebar is only automatically opened during install of the addon.  If you dont have useAddonManager set in the test, you don't get the ADDON_INSTALL reason.
Comment hidden (mozreview-request)

Comment 5

3 months ago
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/673306dc657e
add command support for sidebar-action, r=aswan

Comment 6

3 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/673306dc657e
Status: NEW → RESOLVED
Last Resolved: 3 months ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Updated https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/commands#Special_shortcuts

Does this cover it?
Flags: needinfo?(mixedpuppy)
(Assignee)

Comment 8

2 months ago
Yep, Thanks!
Flags: needinfo?(mixedpuppy)
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.