New to Extension Development - Bookmark API and Search Function


(Tim G) #1

A outstanding issue with Firefox Bookmarks is that a search will show the bookmarks, but will not give any clue of where they are located in the tree. The use case is: For a new page I want to bookmark, I first search for a similar item, and desire to store the new bookmark in the same folder. Unfortunately, from the search list, there is no way to know the location of the found bookmark to open that folder and add another.

The Add-ons “Show Parent Folder” and “Go Parent Folder” formerly solved this issue. They are now legacy and not updated.

I find this to be an important function, along with many other people, so I will try to develop a replacement.

The required functionality is: from the Bookmark Search Results list, provide a way to view the path to the bookmark’s folder. There are several options how this could be done:

  1. Extend the listing to include a new column that contains the folder path to the bookmark
  2. Add a function to the right-click menu that will display the path in an edit box
  3. Add the path to the edit boxes at the bottom (Name, Location, Tags, Path)
  4. Add a button that will expand the treeview on the left, to open and highlight the folder of the selected bookmark in the search results.

As I study the Web Extensions Bookmark API I cannot determine how I would accomplish any of these approaches. How is it possible to interact with the search results? How can the extension interact with the selected bookmark?


(Niklas Gollenstede) #2

Actually, the only option you currently have is to implement an entirely new UI.

To integrate into existing UI, I guess you’d need a "bookmark" menus.ContextType and a bookmarks.show() function or something similar. Neither exist, but seem like appropriate APIs to me. You could ask Mozilla to add them.


(Nicolas MANDIL) #3

I openned a thread on reddit 2 months ago, so happy to read that you wish to develop it as a Web Extension.

You will find all needed information to ask Mozilla on the Web Extension wiki page.

I’ll be happy if you let me know how it is going forward, to follow and help as much as I can (I’m not a dev), as I use this add-on daily.


(Tim G) #4

@NilkasG, if we have to “ask Mozilla” to even get the needed API, why not just ask Mozilla to add the bookmark folder path functionality to Firefox? It sounds like creating an extension is taking the long way around…


(Niklas Gollenstede) #5

Sure, you can do that as well. Should they reject it, you can use my idea as a plan B.


(Nicolas MANDIL) #6

I just opened a Meta bug 1420247 to migrate go-parent-folder addon to webextensions and the bug 1420246 for the bookmarks.show() function.

The "bookmark" menus.ContextType that works for bookmark sidebar and library window items is bug 1419195

Be free to do anything needed to go forward, as I’m not a dev :frowning:


(Nicolas MANDIL) #7

To make it a Firefox’s functionnality, it seems it is bug 1272891. I tried to make it go forward…


(Hermann San) #8

another possibility: when you hover over the bookmark, there is a “mouse-over” function that would show the bookmark name and URL (the yellow box below). One could possibly also add the folder path there

grafik


(Nicolas MANDIL) #9

News : During tomorrow 11:30am pacific time WebExtension triage meeting, a decision will be made about APIs to migrate Go-Parent-Folder to webextension.

If you want to attend, you should use VidyoRoom.


(Frank Johnson) #10

This is an extremely useful feature that was lost when Quantum deactivated the “Show Parent Folder” add-on. I’m following this topic in hope of good news soon.


(Nicolas MANDIL) #11

Hi everyone !
I seems a developer started to fork and update to WebExtension the addons made by the go-parent-folder author.
While not exactly the same, he created Bookmark search plus 2 (or on github) that have the ‘find in the bookmark tree’ feature.