Allow sidebar extensions access to native tab context menu

RESOLVED DUPLICATE of bug 1280347

Status

P5
enhancement
RESOLVED DUPLICATE of bug 1280347
2 years ago
4 months ago

People

(Reporter: geoffreydebelie, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [contextMenus][design-decision-approved])

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20170625030210

Steps to reproduce:

Sidebar extensions like Tab Center Redux which implement "Vertical Tabs" functionality currently can't use the tab (UI) context menu, forcing them to implement their own custom tab context menu, replicating standard Firefox functionality.

There are a few problems with this approach:
* Functionality might not work exactly the same as in the native tab context menu
* Items will be missing
** If Firefox adds new context menu items the addon won't have those immediately
** There is no WebExtensions API for "Send to device", so addons can't replicate that functionalty in the tab context menu of their own UI (which is HTML)
** WebExtensions that add their own context menus to the "tab" context won't be shown in the replicated tab context menu.

A way to show the tab context menu (some kind of API?) for HTML components in a sidebar extension is needed very badly.

https://bugzilla.mozilla.org/show_bug.cgi?id=1367160 is related.
I think the bug 1280347 aims to solve same problem. I also believe that we should not implement sidebar context menu by own.

Related issue on my "Tree Style Tab" addon: https://github.com/piroor/treestyletab/issues/1333
Another bug 1396031 seems including effective API proposal.

Updated

a year ago
Severity: normal → enhancement
status-firefox57: --- → wontfix
Priority: -- → P5
Whiteboard: [contextMenus][design-decision-needed]
Hi Geoffrey and Piro, this has been added to the agenda for the January 23, 2018 WebExtensions APIs triage meeting. Would you be able to join us? 

Here’s a quick overview of what to expect at the triage: 

* We normally spend 5 minutes per bug
* The more information in the bug, the better
* The goal of the triage is to give a general thumbs up or thumbs down on a proposal; we won't be going deep into implementation details

Relevant Links: 

* Wiki for the meeting: https://wiki.mozilla.org/WebExtensions/Triage#Next_Meeting
* Meeting agenda: https://docs.google.com/document/d/1Mc0h5OVd30WBjCORssdifZRXYQrk6WcTqX1cw6ADO9k/edit#
* Vision doc for WebExtensions: https://wiki.mozilla.org/WebExtensions/Vision
OK I'll join to the IRC channel while the meeting.
This bug and bug 136031 have been approved.
Whiteboard: [contextMenus][design-decision-needed] → [contextMenus][design-decision-approved]
My suggestion is that we provide sidebar contexts with an API to open the tab context menu for a given element by passing a tab ID and a context element. The extension would be responsible for listening to the contextmenu event and deciding when the context menu would be opened.

From an implementation perspective, we'd probably need the real context element to be mapped to the XUL tab, but we'd display it as if it belonged to the HTML version.
(Reporter)

Comment 7

a year ago
(In reply to Kris Maglione [:kmag] (long backlog; ping on IRC if you're blocked) from comment #6)
> My suggestion is that we provide sidebar contexts with an API to open the
> tab context menu for a given element by passing a tab ID and a context
> element. The extension would be responsible for listening to the contextmenu
> event and deciding when the context menu would be opened.
> 
> From an implementation perspective, we'd probably need the real context
> element to be mapped to the XUL tab, but we'd display it as if it belonged
> to the HTML version.

Sounds good to me.

(In reply to Caitlin Neiman [:caitmuenster] from comment #5)
> This bug and bug 136031 have been approved.

You mean https://bugzilla.mozilla.org/show_bug.cgi?id=1396031
See Also: → bug 1396031

Updated

7 months ago
Product: Toolkit → WebExtensions
Bulk move of bugs per https://bugzilla.mozilla.org/show_bug.cgi?id=1483958
status-firefox57: wontfix → ---
Component: Untriaged → General

Updated

4 months ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1280347
You need to log in before you can comment on or make changes to this bug.