Closed Bug 1347041 Opened 9 years ago Closed 9 years ago

Create WebExtensions API for opening Firefox built-in dialogs like Clear History

Categories

(WebExtensions :: Untriaged, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: markus.popp, Unassigned)

Details

(Whiteboard: [design-decision-denied] )

This is a follow-up to the Twitter discussion at https://twitter.com/mpopp75/status/841130525997821953 It would be nice if WebExtensions could open dialogs like Clear History or the About window (see screenshot in Twitter discussion). There may be other dialogs to include as well. Currently the "Toolbar Buttons" addon (which I assume is a XUL/XPCOM extension): https://addons.mozilla.org/en-US/firefox/addon/toolbar-buttons/ ... provides buttons for these actions, so it must have been possible in the past. Unfortunately the "Clear History" and "About" dialog buttons of this addon are broken as of Firefox 55.0 and since XUL/XPCOM extensions will be deprecated soon, I would love to create a small WebExtension addon myself as replacement.
To be discussed at the WebExtensions Triage meeting on March 21. Agenda: https://docs.google.com/document/d/1xM6iKOSGo9cDWw3ZA27PT-AVlx1Mvd79sxC6pYNhBqU/edit?usp=sharing
Isn't that already supported (on chrome at least, I don't know about firefox) ? https://chrome.google.com/webstore/detail/tab-sidebar/egmcoemabahnkbkfgdifiafkhebcfpfo https://chrome.google.com/webstore/detail/sidewise-tree-style-tabs/biiammgklaefagjclmnlialkmaemifgo chrome.windows.create({ url: "tab-sidebar.html", type: "popup", width: 400, height: 650 });
Comment 2 works when I try it. Does it cover your use case, or were you thinking of something else ? To close the window that was just opened, window.close() should work.
Flags: needinfo?(markus.popp)
Actually, you can't open built-in Firefox dialogs which seems to be what comment 0 is asking for. What you can do for the clear history dialog is to re-implement the dialog using the WE APIs, then make a browserAction that opens that window.
Flags: needinfo?(markus.popp)
Summary: Create WebExtensions API for opening dialogs like Clear History → Create WebExtensions API for opening Firefox built-in dialogs like Clear History
This API would be useful for adding buttons to launch: - the browser console - the browser toolbox - page info dialog - possibly other dialogs ?
Print dialog is another one that comes to my mind. (In reply to Tim Nguyen :ntim from comment #5) > This API would be useful for adding buttons to launch: > - the browser console > - the browser toolbox > - page info dialog > - possibly other dialogs ?
(In reply to Markus Popp from comment #6) > Print dialog is another one that comes to my mind. This one is actually possible. You can run a content script on the selected tab that contains `window.print();`.
Whiteboard: [design-decision-needed]
One thing worth noting is that this is somewhat supported in chrome. You can open URIs like "chrome://settings/clearBrowserData"
This API request has been discussed during the last "WebExtensions APIs Triage" meeting and it has been denied, the reasons are that we are not convinced that a specific API to open this particular dialog would be generically useful for extensions. If that dialog is supposed to be available from the Firefox UI and it is not properly reachable because something is broken, it should be reported and fixed as its own issue (with the goal to fix it for everyone without the need to install an extension to workaround the issue).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Whiteboard: [design-decision-needed] → [design-decision-denied]
The fix is very simple: add buttons for these actions to the toolbar icon collection by default.
Request filed as bug 1349639
Bug 1349639 was rejected as well meaning this functionality which was available at least via XUL/XPCOM extension will be lost. This is not in line with the commitment to create adequate replacements for everything XUL/XPCOM extensions could do. If not even basic functionality like this will be replaced, how much more will be lost as soon as XUL/XPCOM extensions are no longer available? Firefox's biggest strength is its customizability but that will not be true in the near future anymore it seems.
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.