aaFn / Bookmark-search-plus-2

Displays and filters bookmarks on search string, show parent folders. This is a Web Extension add-on version of the old "Bookmark search plus" XUL extension published by Alice0775, not working anymore in latest Firefox, and which was very useful.
116 stars 11 forks source link

Folder contents pane in tab/full screen view - Reqs for Bookmark Library extension #170

Open shoulders opened 3 years ago

shoulders commented 3 years ago

The only thing missing in full screen view is now having a folder contents view on the right like the native FF bookmarks APP.

I would like this so I can use it to organise my 10,000+ URLs that need looking at.

Is it possible to add this?

image

aaFn commented 3 years ago

Hello @shoulders, best wishes for the new year. What you are showing is the Bookmark Library. It is a rather different principle of showing things, and BSP2 is not meant to replace the Bookmark Library.

Note by the way that BSP2 doesn't really know if it is running in a sidebar or in a tab, so doesn't have a notion of "full screen view". This is the same code which is running in both cases. The only difference is that there is more screen estate when running in a tab (FF limits the size of the sidebar).

shoulders commented 3 years ago

Thanks for the best wishes and I hope 2021 is better for you aswell.

Is it possible to put a manual toggle in for these things rather than automating it?

aaFn commented 3 years ago

A small correction, I have a way to know that the code is running in a tab or in the sidebar. That does not change the answer here (BSP2 is not meant to replace the Bookmark Library), however, that could help answer your other demand in #171 .

Not sure about your question about manual toggle vs automation : about which things ?

shoulders commented 3 years ago

not sure what caused duplicate. 😦

The question was about you saying that the same code ran in the sidebar as it did in the full tab mode and that your code did not know the difference. so my suggestion was to add a manual button to turn content pane on and off manually.

aaFn commented 3 years ago

I see. As said, the display code would really be different, I do not want to have two display codes in BSP2. Maybe one day an extension add-on to BSP2, like for #154, and that would be something to install in addition (like TST does), but not in BSP2 itself => I am changing the title accordingly.

peter-lyons-kehl commented 2 years ago
  1. @shoulders If it helps you to see Firefox Bookmarks Manager in a tab (rather than in a separate window or a dropdown): Open Firefox special URL chrome://browser/content/places/places.xhtml. (Beware that it used to look ugly, but it looks good in FF 95.0). (Unfortunately, no Bookmarks Search+ 2, neither any other extension, can open privileged chrome:// URLs. And even if it could, there's no anchors in Bookmarks Manager's tree of bookmarks to point to.)

  2. @aaFn What is "TST", please?

  3. @aaFn If you meant sharing/interacting with another extension's code: Unfortunately, that is a no-no since Web Extensions. Before that an extension could hook into/replace files of another extension. Not anymore (due to security and confusing the users).

aaFn commented 2 years ago

Hello @peter-kehl , TST is Tree Style Tabs https://addons.mozilla.org/en-US/firefox/addon/tree-style-tab/ It has a system of modeuls that can be addded and interact with the main TST module through messaging. The same could happen one day to BSP2, I already rely on internal similar messaging between the many instances of BSP2 that can run (when there are multiple FF windows)

Gitoffthelawn commented 2 years ago

@peter-kehl Have you experienced any issues when using Firefox's Bookmarks Manager in a tab by directly opening chrome://browser/content/places/places.xhtml?

@aaFn Just FYI, the limit of the width of Firefox's sidebar is just a limit set via the CSS being used internally. You can manually override this code in userChrome.css. You can also override both the minimum and maximum widths, if you like. For example, if you like maximum flexibility, you can use:

#sidebar-box {
    min-width: 0 !important;
}
#sidebar {
    max-width: 100% !important;
}

I wrote that code a long, long time ago (cue John Williams), and I've had no issues using it the entire time.

peter-lyons-kehl commented 2 years ago

@Gitoffthelawn FF Bookmarks Manager (chrome://browser/content/places/places.xhtml) works well. The only disadvantage is that FF Bookmarks Manager and BSP2 remember expand/collapsed trees of bookmarks separately. But it could be an advantage in itself: I'll use FF Bookmarks Manager for one set of bookmarks, and BSP2 for the other set.

Gitoffthelawn commented 2 years ago

@peter-kehl Good to hear. Thanks Peter. When you mention you'll use FF Bookmarks Manager for one set of bookmarks, and BSP2 for the other set, you're technically referring to 2 different places within the tree of the same set of bookmarks, correct? (I would love to truly have 2 sets of bookmarks.)

peter-lyons-kehl commented 2 years ago

@Gitoffthelawn Yes, I only need separate expand/collapse status for various purposes/tasks. There's a third way: chrome://browser/content/places/bookmarksSidebar.xhtml (which is the same as "Bookmarks" in the sidebar). It keeps the expand/collapse status peristent, but separate from FF "Manage Bookmarks".

If you need separate/isolated sets of bookmarks, how about two or more Firefox profiles, and only one synchronizing the bookmarks (while the rest would save bookmarks locally only) - about:preferences#sync? You could still sync logins, history, addons, (some) settings.... but no cookies (so you'd need to re-login). And maybe there's an addon that allows you to sync bookmarks to a non-Mozilla storage, which you could then share between some FF profiles.

Gitoffthelawn commented 2 years ago

@peter-kehl (and @aafn, especially towards the end of my novel!) Thanks for the ideas Peter. I'm surprised I never thought of using chrome://browser/content/places/bookmarksSidebar.xhtml before... that will likely come in handy.

Regarding multiple sets of bookmarks, my desire is to have 1 set of bookmarks that is used by Firefox's urlbar (address bar) for suggestions & autocomplete, and when performing local bookmark searches. The other set (or perhaps even sets) would not be used for those functions.

The reason for this desire is because, let's say, I have a bookmark for https://github.com/peter-kehl. Since I find your work interesting, I want to keep that bookmark in my main bookmarks. This is because I want to be able to type "peter" in the urlbar, and have Firefox suggest that bookmark.

So far, so good.

But now let's say I also have a bookmark to an online article that looked interesting named Peter and Petra learn Git. Now maybe I'll read that article someday... perhaps I won't. The odds of me wanting to regularly visit that bookmark are slim. So, although I want to keep that article bookmarked, I don't want it showing up in any autocomplete or search results.

Now let's extrapolate that example for tens of thousands of bookmarks. I'm not sure how many bookmarks I currently have, but let's say there are 80,000 of them. Of those, I likely only regularly visit about 300 sites. Plus, there are perhaps another 1000-5000 sites that I visit occasionally (several times per year). Then there are another 5000 or so sites that I'll typically only visit once every 1-5 years, but if I want to visit them, I might visit them 10 times in the same month.

All the other bookmarks (the majority of them), are things like articles I might choose to read or videos I might choose to watch (yes, I would need to live to be a thousand years old to read/watch all of them... and then I'm still not sure if I would have enough time!). So for these, I don't want them showing up in autocomplete or bookmark search results. But I still want to be able to find them quickly.

To help improve the quality of autocomplete and bookmark search results, I currently use a text file to store tens of thousands of "bookmarks". But that text file is a lot less useful than having everything saved as bookmarks within the browser. It results in me having to search multiple places, having to manage duplicates, having to maintain two different methods of detecting and updated changed URLs, and more. Plus, since it's just a text file, searching within it is quite limited. I perhaps would be better off using a database application, but that comes with a different set of drawbacks.

And even with that text file offloading many bookmarks, I rarely want to regularly visit the majority of my bookmarks saved within Firefox.

What I would really love is for Firefox (or BSP2) to have 2 separate categories: bookmarks that I want to appear in autocomplete/search results, and those I do not. 3 (or more) categories would be even better, because then I could tier bookmarks into tiers such as:

How web browsers (and thus BSP2) currently work is the opposite: the default is to report every bookmark, and you can only narrow the results.

As I am writing (and yes, I'm apparently writing a novel here... eat your heart out George R. R. Martin!), I'm thinking BSP2 could actually be a great tool to handle this functionality in a novel way. How? By automatically adding user-specified default strings or tags to search terms.

As an example, let's say I tagged the https://github.com/peter-kehl bookmark with a tag called always. BSP2 could have a setting that auto-added one or more user-defined tags (or strings) to its searches. That could really work well. Then BSP2 search results will only display results with the always tag.

I currently do something like this within Firefox by using tags, but AFAIK, Firefox no longer has a search modifier to search only for bookmarks with a specific tag (I think you could do this at one point, but the + search modifier seems to just search for any bookmark with any tag, which is next to useless). Consequently, it gets hard/impossible to search within the desired scope within Firefox, and I always have to type multiple search terms to narrow things down to find the bookmark I want.

I hope that someday Mozilla will improve Firefox's bookmark functionality, but I've been waiting well over a decade, and it is still rudimentary. This could be a great opportunity for BSP2 to shine and add some innovative functionality to truly improve the browser bookmarking experience!

aaFn commented 2 years ago

Hi guys, a couple of thoughts if you allow me to add: