Notes on the BSP2 trash and on the Bookmark history window - aaFn/Bookmark-search-plus-2 GitHub Wiki

The BSP2 trash folder is the base function I implemented for properly executing Ctrl-Z (undo) and Ctrl-Y (redo). Indeed, the FF Web Extension API for add-ons does not provide a way to undo/redo the last operations on bookmarks, nor to manage an undone stack.

Can I fully hide the BSP Trash folder ?

The BSP2 trash folder is a standard folder, placed in the "Other Bookmarks" folder. Although BSP2 hides it (unless you activate the corresponding debug option in the BSP2 Options page), the native FF bookmark sidebar, the FF personal toolbar and other add-ons managing/manipulating bookmarks will see it, and its content.

There is no way I know of of hiding a bookmark folder. However, it is possible to somewhat hide it in the personal toolbar by right clicking on "Other Bookmarks" and unchecking "Show Other Bookmarks.". This will of course hide all other sibbling bookmarks, besides the BSP2 trash folder, which are in "Other Bookmarks", so this is not a perfect solution.

I think there should be a way to let users know to do this, perhaps with an extension landing page. A landing page would also be good for explaining the the extension and its features.

When BSP2 trash is activated (default)

When the BSP2 trash option is activated (this is the default), all bookmark deletes made inside BSP2 go instead to the BSP2 trash, so that it is possible to "undo" the delete by simply moving back the "deleted" bookmark to where it was.

Undo/redo also apply to deletes or other actions made outside of BSP2, although the undo of a delete made outside of BSP2 will recreate it since BSP2 does not have access to the undo/redo stack of the FF native bookmark sidebar or the add-on which deleted the bookmark. Therefore, it will be considered as another bookmark, and if after that, an undo is made in the original interface, the bookmark will then appear twice.

When BSP2 trash is not activated

When the BSP2 trash option is not activated, all bookmark deletes really delete the bookmark. In such cases, "undo" will create a new bookmark which will look the same, but it will have a different internal unique id, and a new creation time not reflecting the old one. Also, any tag, keyword, or description field which were present on the old bookmark will be lost, because BSP2 - like other add-ons -, cannot see them (see https://bugzilla.mozilla.org/show_bug.cgi?id=1225916 (vote for this bug!)).

Again, undo/redo also apply to deletes or other actions made outside of BSP2, although the undo of a delete made outside of BSP2 will recreate it since BSP2 does not have access to the undo/redo stack of the FF native bookmark sidebar or the add-on which deleted the bookmark. Therefore, it will be considered as another bookmark, and if after that, an undo is made in the original interface, the bookmark will then appear twice.

Bookmark history window

The bookmark history window can be accessed by clicking/right clicking on the search button (magnifying glass) at left of the search box and clicking on "Bookmark history..".

It can also be accessed by right-clicking on the BSP2 star in the FF toolbar, and clicking on "Bookmark history..".

This window allows to see all the history of actions made on bookmarks in the last 30 days (default, can be customized up to 9999 days), such as create, remove, change (title or URL), move, .. All the actions made from any place are recorded, whether they come from BSP2, from the FF native bookmark sidebar or from another add-on manipulating bookmarks.

This window also show the stack of BSP2 undo and redo actions (and only the BSP2 ones), and their status = whether they are active (so can be redone) or not.

Ctrl-Z and Ctrl-Y are also active inside the Bookmark history window to allow doing those actions from the window, and seeing in real time their effect or what is available.