Implement remaining bookmarks.onImportBegan and onImportEnded WebExtensions API events

NEW
Assigned to

Status

()

Toolkit
WebExtensions: Compatibility
P3
normal
7 months ago
23 days ago

People

(Reporter: bsilverberg, Assigned: mstriemer)

Tracking

(Blocks: 1 bug, {dev-doc-needed})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [bookmarks]triaged)

(Reporter)

Description

7 months ago
Bug #1221764 implements onCreated, onChanged, onMoved and onRemoved, which are the most commonly used events. Based on the Chrome spec [1], there are still a few missing:

- onChildrenReordered
- onImportBegan
- onImportEnded

[1] https://developer.chrome.com/extensions/bookmarks
Keywords: dev-doc-needed
(Reporter)

Comment 1

6 months ago
I looked into Chrome's onChildrenReordered event, and I don't think it would ever fire from Firefox. As per the docs [1], and my testing, it never fires as the result of manually executing a move, even if you are using the UI to reorder child bookmarks in a folder. The only time it fires is if you use the "Reorder by Title" menu item that appears in a submenu under "Organize" from the Bookmark Manager. I do not think Firefox has an equivalent function, and therefore the case that would cause onChildrenReordered to fire could never happen in Firefox. Do you agree, Kris?

[1] https://developer.chrome.com/extensions/bookmarks#event-onChildrenReordered
Flags: needinfo?(kmaglione+bmo)
Yeah. Maybe we should just implement it as a stub.
Flags: needinfo?(kmaglione+bmo)
(Reporter)

Comment 3

6 months ago
Updating this to only be about implementing onImportBegan and onImportEnded.
No longer depends on: 1221764
Priority: -- → P3
Summary: Implement remaining chrome.bookmarks events → Implement remaining bookmarks.onImportBegan and onImportEnded WebExtensions API events
Whiteboard: [bookmarks] → [bookmarks]triaged

Comment 4

5 months ago
Presumably this would mean implementing bookmarks.import and export
Assignee: nobody → mstriemer
(Reporter)

Comment 5

5 months ago
Not really. Even without those API methods, import and export functions can be invoked by a user, which would then result in these events firing. In fact, Chrome doesn't even have import or export methods in their bookmarks API [1], so this would not be a matter of Chrome parity, but rather would be new APIs if we were to implement them.

[1] https://developer.chrome.com/extensions/bookmarks

Comment 6

5 months ago
Fair enough then, let's skip those methods and focus on the events.

Comment 7

23 days ago
(In reply to Bob Silverberg [:bsilverberg] from comment #1)
> I looked into Chrome's onChildrenReordered event, and I don't think it would
> ever fire from Firefox. As per the docs [1], and my testing, it never fires
> as the result of manually executing a move, even if you are using the UI to
> reorder child bookmarks in a folder. The only time it fires is if you use
> the "Reorder by Title" menu item that appears in a submenu under "Organize"
> from the Bookmark Manager. I do not think Firefox has an equivalent
> function, and therefore the case that would cause onChildrenReordered to
> fire could never happen in Firefox. Do you agree, Kris?
> 
> [1]
> https://developer.chrome.com/extensions/bookmarks#event-onChildrenReordered

Hello,
in the bookmarks manager (library) I can right click on a bookmarks folder and
choose "order by name" (in italian it's "ordina per nome"). 
Isn't this exactly the same function as "Reorder by Title" in Chrome?
(Reporter)

Comment 8

23 days ago
(In reply to Tortino from comment #7)
> 
> Hello,
> in the bookmarks manager (library) I can right click on a bookmarks folder
> and
> choose "order by name" (in italian it's "ordina per nome"). 
> Isn't this exactly the same function as "Reorder by Title" in Chrome?

Thanks Tortino, you are correct. I was actually corrected about this by Marco several months ago in bug 1319530 which I opened to track the implementation of bookmarks.onChildrenReordered.
You need to log in before you can comment on or make changes to this bug.