support key commands for sidebars

RESOLVED FIXED in Firefox 54

Status

P2
normal
RESOLVED FIXED
2 years ago
8 months ago

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

Tracking

({dev-doc-complete})

49 Branch
mozilla54
dev-doc-complete

Firefox Tracking Flags

(firefox54 fixed)

Details

(Whiteboard: triaged)

Attachments

(1 attachment)

(Assignee)

Description

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

Updated

2 years ago
Priority: -- → P2
Whiteboard: triaged
Comment hidden (mozreview-request)
Keywords: dev-doc-needed

Comment 2

2 years 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

2 years 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

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

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/673306dc657e
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
(Assignee)

Comment 8

2 years ago
Yep, Thanks!
Flags: needinfo?(mixedpuppy)
Keywords: dev-doc-needed → dev-doc-complete

Updated

8 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.