[WebExtensions] Add a way to open about:preferences#containers
Categories
(WebExtensions :: Frontend, enhancement, P5)
Tracking
(Not tracked)
People
(Reporter: aria, Unassigned)
References
(Depends on 1 open bug)
Details
(Whiteboard: design-decision-needed)
Attachments
(1 obsolete file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Steps to reproduce:
Use containers in my addon.
Actual results:
I can’t provide a way for the user to go directly to about:preferences#containers
Expected results:
I should be able to open about:preferences#containers, for example in a menu related to containers, I would like to have a «Manage Containers» like in the long-click New Tab button of the tab bar of Firefox.
Comment 1•6 years ago
|
||
Bugbug thinks this bug is a enhancement, but please change it back in case of error.
Updated•6 years ago
|
I could be done as a function with name contextualIdentities.openOptionsPage(), similarly to runtime.openOptionsPage(), or with a slightly different name: openPreferencesPage().
I didn’t find how to open a page, here about:preferences#containers, from inside the WebExtensions code.
I didn’t find either how to check that the URL has been opened.
Any help to get me started will be appreciated.
Comment 5•5 years ago
|
||
Side note: I just saw this bug by coincidence. Next time, if you have a feature request for an extensions API, file the bug under the WebExtensions component, so that the right people can see the bug.
The contextualIdentities API provides all information that you need to recreate the UI yourself. Why do you need the ability to directly open the preferences page?
Next time, if you have a feature request for an extensions API, file the bug under the WebExtensions component, so that the right people can see the bug.
That’s definitely an error on my part, sorry.
The contextualIdentities API provides all information that you need to recreate the UI yourself. Why do you need the ability to directly open the preferences page?
I’m developing Tab Center Reborn which uses contextual identities and I want to add a “Manage Containers” in the context menu, similar to what Firefox does.
My extension is not a contextual identities manager and I don’t want to write dozens or hundreds of line of code only to recreate something that’s perfectly good and already exist in Firefox itself.
Any extension using but not managing contextual identities may want to let the user easily access the “Container Tabs” page of preferences.
Comment 7•5 years ago
|
||
I'll link this to bug 1269456, because it essentially requests the ability to open an about:-page.
Since your extension already has the contextualIdentities permission and the icon assets, you can work around the current limitation by implementing the functionality yourself, aided by the contextualIdentities API. Even if the API were to be introduced, you probably want a fall back option for older versions anyway.
PS. Your extension has outdated icon assets. Some icons are slightly different, and the fence icon is missing. For the differences, see https://github.com/Rob--W/bookmark-container-tab/commit/c0395084249304d0c3d7f38d8086a85158a9dcc0
I'll link this to bug 1269456, because it essentially requests the ability to open an about:-page.
I realize that I didn’t mention that I was thinking about a function that can only be called from a user action handler, which is very different and much more limited than bug 1269456.
Even if the API were to be introduced, you probably want a fall back option for older versions anyway.
I wouldn’t bother, because it would affect only a tiny portion of users of my extension (ESR users, who are 1,5% of my users), and, assuming the feature would be developed and merged before Firefox 78, the fallback would be useless after Firefox 70 ESR end-of-life (and release of Firefox 78 ESR).
PS. Your extension has outdated icon assets. Some icons are slightly different, and the fence icon is missing. For the differences, see https://github.com/Rob--W/bookmark-container-tab/commit/c0395084249304d0c3d7f38d8086a85158a9dcc0
Thanks a lot, I’m not monitoring changes to those icons and I’ll update them shortly.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 10•5 years ago
|
||
I would be more likely to consider an API that looks like:
browser.browserSettings.openSettingsPage({ type });
Where "type" is an enum defined in the schema that allows for different parts of about:preferences to be opened.
However, we should also consider a more general API, perhaps browser.tabs.openBrowserPage({ type, tag }) where type would be an enum of available about: pages: ["addons", "preferences", "debugging", ...] and tag (also a schema enum) would be a tag for which part of said pages should be opened.
This all goes back however, to resolving any lingering issues in bug 1269456 (though I'm not interested in a pref to enable API functionality).
In the interim, we need to have some kind of design decision for this functionality prior to accepting any work on it.
Lets see what Philipp thinks about the api in general terms as well.
Updated•5 years ago
|
| Reporter | ||
Comment 11•5 years ago
|
||
In this case, it should be possible to open specific places which don’t have a url#fragment yet, like the «Manage Extension Shortcuts» section in about:addons, for pages that have their own configuration/management page as an independent page and not as an options_ui (for example, Stylus does this).
Comment 12•5 years ago
|
||
Hi @ariasuni,
We had a lengthy discussion today about this api. This bug ended up in P5 without enough guidance or thought on what we would actually want out of this api.
At this time we're in favor of a different API, however some analysis along with a security review needs to happen prior to working up a patch. At a very basic level, a new browser.tabs.openBrowserPage(pageName, options) seems to be a more generic approach. In practice it might look something like:
browser.tabs.openBrowserPage("preferences", { target: "containers" })
The benefit of this is that it gets away from browser-specific nuances while also allowing us to control in schema what is made available to extensions.
We need to do more work on defining what about: pages we might want to make available, then see if there are any concerns (e.g. security) about allowing that.
Given that, we really appreciate your work here, but we probably need to delay any further effort on this bug until we can make some design progress.
Updated•5 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Comment 14•3 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Updated•2 years ago
|
Description
•