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.
114 stars 11 forks source link

Live bookmarks, Context menu, Properties dialog #38

Closed rtallmon closed 6 years ago

rtallmon commented 6 years ago
  1. Live bookmarks don't work i.e. can't open the folder (it doesn't appear to be a folder at all when this add-on is enabled)
  2. Can't scroll to all entries in the context menu when right clicking on the middle third of the menu (I do have the text sizes set to 20 pixels).
  3. The Address: is the only editable field in the Properties dialog. The Name field is mostly hidden by the dialog title, the Tags:, Keyword: and Description: fields don't appear at all.
aaFn commented 6 years ago

Hello @rtallmon

  1. Live bookmarks (= RSS feeds) are not supported by the Firefox WebExtension API https://developer.mozilla.org/en-US/Add-ons/WebExtensions and https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks => they are not visible nor manageable by an add-on, so cannot be shown in BSP2 See also Bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=1276821 .. a guy appear to say that this is becoming obsolete ??

  2. Not sure I understand that one .. That looks like a real estate problem on low resolution device, am I correct ? Would you be able to post a screenshot of the problem ? On which OS are you running Firefox ?

  3. Properties dialog: 3.1 Again looks like a real estate problem for the Name field. Could you post a screenshot ? Note that you can resize the properties window, and if you have checked the option to remember sizes, next time it will open, it will have the same size as when closing. 3.2. For Keywords, Tags and Description fields, as explained on the main add-on page and on the LIMitations in https://github.com/aaFn/Bookmark-search-plus-2/wiki, these are not supported by the Firefox WebExtension API today. So the add-on cannot access them. See Bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=1225916 ... you can vote on it, that may accelerate the bug resolution (it is only 2 years old).

Travelling in the next days, but I will watch your answers to see how to improve at least on 2)

rtallmon commented 6 years ago

I think this about covers it, I'll be happy answer any more relevant questions.

Windows 7 Three monitors: resolution 1600 X 900

I sit 3-4 feet in front of the monitors. sometimes across the room.

Firefox Portable 59.0.3 Bookmark search plus 2 v2.0.17

Item 1: I guess I'll have to live with it, Quantum just doesn't seem like it's ready for prime time.

Item 2: I have moved the tab toolbar to the bottom of the page with a CSS, it is blocking the bottom of your context menu when the menu opens below a certain point in the sidebar bookmarks list. I can scroll the bookmark list up and down to make the whole context menu visible if I need to so not a deal breaker.

I have found the context menu hard to dismiss if I don't want to open either a bookmark or a menu item.

contextmenu1

Item 3: Here's a screenshot of the Properties dialog.

propertiesview1

Thanks for looking at this. b

aaFn commented 6 years ago

Hello @rtallmon , thank you.

  1. On Live bookmarks, I found an obsolete interface https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsILivemarkService, I will see if it is still working and if I can do something with it ... Mind that if working, we are not sure it will last for long.

  2. Ok, I see 2 problems here: 2.1. The viewport information I get does not reflect that you moved the tab toolbar at bottom. Can you share with me the CSS you are using to move the toolbar tab there ? I will test to see if I can find a different viewport information to get that. 2.2. The popup size is made for characters being 12px. I didn't make it variable in size, because I am forcing things to 12px, but maybe in Windows 7 this force is not working well. So things are cut on the right .. I suspect the properties dialog problem has the same origin and reason. Could you here also share with me the method by which you changed the character size to 20px, so that I can try and adapt to that ? Note: finding a way to force 12px as intended might be another way to fix things, however I presume that given your resolution, forcing things to 12px would not be good for you .. What is your preference ?


On the context menu harder to dismiss, this is coming from the fact that Quantum does not allow us add-ons to open true system dialog menus anymore .. So we have to emulate .. and some things are missing, like if you click outside the sidebar, or type a key while keyboard focus is outside the sidebar, those events never make it to the add-on and so it cannot know that it should dismiss the menu.

Ways to dismiss a context menu without opening a bookmark or a menu item:

Hope that helps and makes life easier :-)

rtallmon commented 6 years ago

Thanks for your quick response, I thought you were leaving for several days.

  1. Please don't spend a lot of time on this one, it looks like Live Bookmarks are probably doomed, I do use them and like them but I guess they are going the way of easily customizable browsers.

2.1 I'm using two separate files of CSS to put the toolbar at the bottom of the page and also extend it the full width which doesn't happen without the TabsBelowNavigationBar section (I stumbled on this by accident). I add toolbar buttons to the right end of the Tabs Toolbar.

The files are imported (along with others) into userChrome.css and the Firefox Title bar must be displayed for it to work.

I notice that the sidebar itself does not compensate for the toolbar being at the bottom.

/TabsBelowNavigationBar.css/ / Tab bar below Navigation & Bookmarks Toolbars /

nav-bar { / main toolbar /

-moz-box-ordinal-group: 1 !important; box-shadow: none !important; }

PersonalToolbar { / bookmarks toolbar /

-moz-box-ordinal-group: 2 !important; }

TabsToolbar { / tab bar /

-moz-box-ordinal-group: 3 !important; padding-top: 0 !important; } / Clean up spacing / .titlebar-placeholder { display: none !important; } toolbarbutton.bookmark-item { padding-top: 2px !important; padding-bottom: 2px !important; }

/ If you display either: (1) The title bar, or (2) On Windows, the menu bar You might not want the following extra space above the main toolbar. In that case, delete the following rule: /

/ #navigator-toolbox { padding-top: 20px !important; } /

/ Background for Light and Dark themes /

main-window[lwthemetextcolor="bright"] #TabsToolbar,

main-window[lwthemetextcolor="dark"] #TabsToolbar {

background-color: var(--chrome-secondary-background-color) !important; background-image: none !important; }

main-window[lwthemetextcolor="dark"] .scrollbutton-up,

main-window[lwthemetextcolor="dark"] .scrollbutton-down,

main-window[lwthemetextcolor="dark"] .tabs-newtab-button,

main-window[lwthemetextcolor="dark"] #new-tab-button,

main-window[lwthemetextcolor="dark"] #alltabs-button {

fill: var(--lwt-text-color) !important; } / Left and right borders on Win 7 & 8, but not on 10 and later: / @media (-moz-os-version: windows-win7), (-moz-os-version: windows-win8) { / Vertical toolbar border /

main-window[sizemode=normal] #navigator-toolbox > toolbar#TabsToolbar {

border-left: 1px solid hsla(240,5%,5%,0.3) !important;;
border-right: 1px solid hsla(240,5%,5%,0.3) !important;;
background-clip: padding-box;

} }

/ Override vertical shifts when moving a tab (9 Jan 2018) /

TabsToolbar[movingtab] {

padding-bottom: 0 !important; }

TabsToolbar[movingtab] > .tabbrowser-tabs {

padding-bottom: 0 !important; margin-bottom: 0 !important; }

TabsToolbar[movingtab] + #nav-bar {

margin-top: 0 !important; }

/end tabs below nav bar/

and the second file:

/TabsAtBottomOfPage.css/ @-moz-document url("chrome://browser/content/browser.xul") { :root:not([tabsintitlebar]) #TabsToolbar { transform: translateY(100vh) !important; } :root:not([tabsintitlebar]) #navigator-toolbox { margin-top: calc(0px - var(--tab-min-height)) !important; } :root:not([tabsintitlebar]) #browser-panel { padding-bottom: var(--tab-min-height) !important; }

:root:not([tabsintitlebar]) #TabsToolbar              { -moz-box-ordinal-group: 0 !important; }
:root:not([tabsintitlebar]) #toolbar-menubar          { -moz-box-ordinal-group: 1 !important; }
:root:not([tabsintitlebar]) #nav-bar                  { -moz-box-ordinal-group: 2 !important; }
:root:not([tabsintitlebar]) #PersonalToolbar          { -moz-box-ordinal-group: 3 !important; }
:root:not([tabsintitlebar]) #navigator-toolbox::after { -moz-box-ordinal-group: 4 !important; }

} /end TabsAtBottomOfPage/

2.2 I set the text size to 20 through the Options page, Language and Appearance/Fonts & Colors Size and Advanced/ Proportional Size, Monospace Size Minimum font size are all set. I use this size so I can read the text at a considerable distance from the screens, larger text sizes cause multiple problems on multiple web sites. I also have the Windows display size set to 125%

Thanks for the tips on dismissing the context menu, I'll learn to focus my dismissal clicks and yes, the tips do make my life easier.

aaFn commented 6 years ago

Hello @rtallmon , I could test your code and customizations, and here is what I find:

  1. The livemarkService interface https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsILivemarkService is not working anymore .. => so this is the end of that story.

  2. (ex 2.1) There is some error in the code above for the tabs bar below Navigation & Bookmarks Toolbars, but I found the right code in https://www.userchrome.org/what-is-userchrome-css.html. That one is working ... However, the piece of code after that, in the second file /TabsAtBottomOfPage.css/ is not working for me, whether I try it in Windows 7 or Windows 10. To make it have an effect, I need to remove the :root:not([tabsintitlebar]) at front of each line .. And there the effect is anyway not getting it right = the tabs bar disappears from top, and is not appearing at bottom. However, that piece of code does destroy the bookmark properties menu, and produces the effect of your screenshot, with no way to show the upper part (the Title field), whatever the size of the property window => there is something wrong in that piece of code, and this is what is making the bookmark properties window unusable. I found that the piece which is making things wrong is the one below, so I can only advise that you remove it, hoping this is not having any other side effect on your intended behavior, because there is nothing I can do in the add-on code and HTML to overcome that wrong behavior:

    #navigator-toolbox {
    margin-top: calc(0px - var(--tab-min-height)) !important;
    }
  3. (continued) Anyway, without it, I still remain with a non effective piece of code = tabs are not appearing at bottom. I tried to vary the first line with translateY which is responsible for the move, but that did nothing for me :-( So I searched more and found a piece of code which does what you want, in https://support.mozilla.org/en-US/questions/1189624 (note the !important I added, they were necessary for things to work in Windows 7 - but not not necessary in Windows 10 .. go figure ..):

    #TabsToolbar {
    position: fixed !important;
    bottom: -0.5em !important;
    width: 100% !important;
    }
    #tabbrowser-tabs { width: 96% !important; }
    #content-deck { margin-bottom: 2.5em !important; }
  4. (continued again) I believe you would have to tune it a little to exactly get what you want, but this one does it very well: the viewport is properly adapting to it, the sidebar is really ending above the tabs bar, and the tabs bar therefore does not overlay the context menus. You can even add toolbar buttons to its right end, so this is working well. However, it still has a slightly annoying side effect on the Bookmarks properties window = that creates a darker bar at bottom of the property window, due to the #content-deck { margin-bottom: 2.5em !important; } piece, which is needed for reserving space at bottom for the tabs bar. This darker bar is "eating" a bit of the Bookmarks properties button when you set character size to 20px minimum in options, however this is easy to circumvent by increasing the height of the properties window. And if you set the "Remember size of resizeable objects" option in the BSP2 options panel, then this will not happen anymore since each time the properties window will be open with the bigger height. I guess another way would be to tune the #content-deck { margin-bottom: 2.5em !important; } line by putting some CSS condition at front so that it is effected only in the main browser window . but I didn't try to find the right CSS code sequence for that.

  5. (ex 2.2) The key element which is impacting context menus and making them not wide enough to show all the length of its menu items is the minimum size setting in Advanced character options. I improved the add-on context menus CSS/HTML settings so that now this is good.

  6. (was not existing) In the proceess of improving for 3., I found a bug in the placement of context menus when the sidebar width is lower than the context menus width .. I corrected it.

Improvement and bug correction for 3. and 4. will be in 2.0.18, which should be out on Sunday evening. I can't do anything for 2., except advise you with the above CSS code in userChrome.css and to tune the CSS as you need .. What is happening is exterior to the add-on code / CSS / HTML, due to the piece of code you have imported in the userChrome.css file, and there is no way to get around it.

Sorry for the long post. I hope the above will help you and resolve some of the problems you have. Let me know.

aaFn commented 6 years ago

Note that if you click on "...", you can delete your unwanted comments :-)

Ok I believe I found a way to ease context menus dismissal, based on focus loss by the sidebar ! I will implement it in 2.0.18, that should make it much easier on context menus.

rtallmon commented 6 years ago
  1. Live Bookmarks-->R.I.P.

2.1.1 I tried using the code at https://www.userchrome.org/what-is-userchrome-css.html and the code by the author of Classic Theme Restorer mentioned below that, and neither worked. I reverted to what I had before.

2.1.2 For the /TabsAtBottomOfPage.css/ to work, the Customize.../Title Bar box must be checked. I don't know why.

2.1.3 I changed the code in my /TabsAtBottomOfPage.css/ file to the code you supplied, modifying the width to 80% (more room for toolbar buttons) and the bottom margin to 1.5 (decreasing unused white space). Your code is working, and without the title bar.

BREAKING NEWS: I've just started having trouble selecting links at the top of web pages (I had to turn on the menu bar to log on to this site). I'll investigate further.

The context menu and the property dialog are working and the sidebar now displays a horizontal scroll bar. I generally hover over a bookmark until the full title is displayed, if I need it, and hence didn't notice the scroll bar was missing.

What is 2.0.18 going to break?-) Good luck and thank you so much for all your help. Is there a place to donate a small sum to encourage you in your efforts for "A Better Browser"?

aaFn commented 6 years ago

Hello @rtallmon, on my side, when trying the new piece of code for tabs at bottom instead of your old /TabsAtBottomOfPage.css/, I do not have any trouble with the links at top of pages.

I also do not get the extra blank space at bottom. I really have to have 2.5em for margin-bottom:, else the tabs are overlapping with the web page and sidebar contents and making it difficult to use the horizontal scroll bar.

So I believe there must be something else in your config/options, or in your imported userChrome.css scripts, which is altering the behavior, and which I do not have. Any idea ?

. By the way, with the new code for tabs at bottom, there is apparently no need anymore for the /TabsBelowNavigationBar.css/ script. Try disabling it, maybe it could resolve some of your latest troubles ?

. 2.0.18 should break nothing :-D .. Just improve the context menu sizes/behavior and some speed acceleration for people with tons of bookmarks ... but you will tell me :-)

I didn't set up any donation mechanism so far, that was for the fun .. I guess one day I should set up something like NoScript does https://noscript.net/features, that looks easy and safe for everybody .. I will see, anyway thanks for the thought :-)

aaFn commented 6 years ago

2.0.18 is out .. let me know ..

rtallmon commented 6 years ago

The parts of v 2.0.18 I use work for me. "The Properties..." dialog works fine with 20pt text and the context menu dismissal is much better, I think I can return to my careless ways.

I've taken the #content-deck { margin-bottom: 1.5em !important; } line out of my "TabsAtBottomOfPage.css", it leaves a blank white strip at the bottom of the page when in full screen. Without that code the text of the "Properties..." line in the context menu and the scroll bar are not visible but the line highlights, with a thin blue line, above the tabs bar that can be selected and bring up the dialog. That's good enough for me. I've never used the scroll bar, I just hover until I see what I want.

I couldn't get a screen shot, the thin blue line disappears (as it should) when I take the cursor off of it.

Thanks again. BTW should I close this thread?

aaFn commented 6 years ago

Hello, happy that we could make things better for you.

Yes, if you are good to go with that, then please close the issue :-) (or I can close it myself in some time if I do not hear from you on this one anymore)

Note: I do not have that blank white strip at bottom on my side, so I still believe there is something in your setup or in your userChrome.css file which is creating it. Without the { margin-bottom: 2.5em !important; } line, I can't fully manipulate / see the pages I am navigating, they are overlapped with the tabs bar, so I can't do without it. I would advise that you keep it aside (like commented out in your file) for the day the thing creating the bottom blank strip disappears or is not working anymore, and you would be in trouble ...

rtallmon commented 6 years ago

It is easier to say "deleted" than "commented out" when the latter is what I did. I'll close this discussion

aaFn commented 5 years ago

An update = Live bokmarks are now not supported anymore as of FF64 and are suppressed / converted to real bookmarks by FF: https://support.mozilla.org/en-US/kb/feed-reader-replacements-firefox so this definetly closes the topic.