Closed Bug 1420974 Opened 3 years ago Closed 3 years ago

API to open bookmarks in new tab

Categories

(WebExtensions :: General, enhancement, P2)

57 Branch
enhancement

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: mconca, Assigned: bsilverberg)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Add a WebExtension API to determine if bookmarks should be opened in the current page or a new tab.  This basically exposes the browser.tabs.loadBookmarksInTabs preference.

This option was popular with Tab Mix Plus users and the China repack of Firefox.
Bob, could we look at landing an API for this please?
Component: WebExtensions: Untriaged → WebExtensions: General
Assignee: nobody → bob.silverberg
Priority: -- → P2
Comment on attachment 8932469 [details]
Bug 1420974 - API to open bookmarks in new tab,

https://reviewboard.mozilla.org/r/203508/#review209100

::: toolkit/components/extensions/schemas/browser_settings.json:65
(Diff revision 1)
>          "$ref": "types.Setting",
>          "description": "Returns the value of the overridden new tab page. Read-only."
>        },
> -      "contextMenuShowEvent": {
> +      "openBookmarksInNewTabs": {
>          "$ref": "types.Setting",
> -        "description": "Controls after which mouse event context menus popup. This setting's value is of type ContextMenuMouseEvent, which has possible values of <code>mouseup</code> and <code>mousedown</code>."
> +        "description": "Controls whether bookmarks are opened in the current tab or in a new tab."

Might be nice to mention it's a boolean.  Side note, how are types validated here?
Attachment #8932469 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8932469 [details]
Bug 1420974 - API to open bookmarks in new tab,

https://reviewboard.mozilla.org/r/203508/#review209100

> Might be nice to mention it's a boolean.  Side note, how are types validated here?

Types are not validated for either the privacy or the browserSettings APIs. This is probably something we should fix, but I'm not sure how to go about doing that.
(In reply to Bob Silverberg [:bsilverberg] from comment #4)
> Comment on attachment 8932469 [details]
> Bug 1420974 - API to open bookmarks in new tab,
> 
> https://reviewboard.mozilla.org/r/203508/#review209100
> 
> > Might be nice to mention it's a boolean.  Side note, how are types validated here?
> 
> Types are not validated for either the privacy or the browserSettings APIs.
> This is probably something we should fix, but I'm not sure how to go about
> doing that.

I opened bug 1421648 to discuss this issue.
Pushed by bsilverberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5a46e18c726d
API to open bookmarks in new tab, r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/5a46e18c726d
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Is manual testing required on this bug? If Yes, please provide some STR and the proper webextension(if required), if No set the “qe-verify-“ flag.
Flags: needinfo?(bob.silverberg)
Flags: needinfo?(bob.silverberg) → qe-verify-
Flags: needinfo?(wbamberg)
Keywords: dev-doc-needed
Flags: needinfo?(wbamberg)
-> https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browserSettings/openBookmarksInNewTabs

Please let me know if this covers it (note that the compat data is not deployed to MDN yet, but will be soon).
Flags: needinfo?(bob.silverberg)
Looks good, thanks Will.
Flags: needinfo?(bob.silverberg)
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.