Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox "2020H2 bookmarks improvements" project #399

Closed
teddy-gustiaux opened this issue Jan 23, 2021 · 10 comments
Closed

Firefox "2020H2 bookmarks improvements" project #399

teddy-gustiaux opened this issue Jan 23, 2021 · 10 comments
Assignees
Labels
type/meta A high-level issue grouping multiple bugs, features or questions.
Milestone

Comments

@teddy-gustiaux
Copy link
Owner

teddy-gustiaux commented Jan 23, 2021

This is a Meta Issue

TL;DR:

Firefox internal changes means the add-on needs to change the way it works internally as well. It will continue to work, with a minor limitation. Bookmarks created by drag-and-drop will automatically be moved to the configured default folder instead of staying where dragged if the Firefox built-in bookmarking override is enabled (moving bookmarks is not affected). Everything else will continue to work as before.

I am planning to release a new major version 3.0 and I hope to have it available on AMO before the official release of Firefox 85 to the public on 2021-01-26.

Description

The Firefox team has been working towards a project called "2020H2 bookmarks improvements" (meta Bugzilla entry here). As the name indicates, it intends to improve the experience regarding bookmarking with the browser, which I believe is a good thing!

However, it does change the way bookmarks are handled internally by Firefox, and as a consequence, breaks the add-on. More specifically, it breaks the original and main feature allowing you to set the default bookmark folder for bookmarks created using the browser built-in system. Let me try to explain why and how I am trying to fix this.

Previously, all bookmarks created by Firefox (i.e. not by a third-party extension) were added by default to the "Other Bookmarks" folder. The add-on was using this fact as a base for its internal logic. It allowed me to process things differently if they were created by Firefox or by another means (i.e. override the default bookmark folder if configured in the former, and doing nothing in the latter).

With this project, Firefox is changing the default folder where created bookmarks are added. Instead of using the "Other Bookmarks" folder, it will use a different one. As you can imagine, this breaks the internal logic of the add-on.

History of the changes

  • Firefox 84.x gets the new browser.toolbars.bookmarks.2h2020 flag.
    It appears its behavior changed between the beta and the stable release. From what I can tell not everybody got the flag enabled either. This explain the issues reported in This extension does not work after updating to Firefox Dev 84.0b2 #356.
  • Firefox 85.x has the flag enabled by default for everybody, and also gets a new flag browser.bookmarks.defaultLocation (I am not quite sure yet how the two interact together).

Getting the add-on working again

One could assume figuring out the value of these flags when the add-on is running and adapting the internal logic accordingly would be enough to fix the add-on. That is a correct statement.

The issue is that there is no way for the add-on to know the value of these flags. Every user can access and change them via the about:config page, but there is no WebExtension API allowing developers to read these values, or any of the about:config values. This has been the case since Firefox 57.x ("Quantum") and the introduction of WebExtensions, for good security reasons.

Not having a way to read these values, the add-on will have to assume every bookmark is created by the system.
What does that mean?

It means the add-on will continue to work, with a minor limitation. Bookmarks created by drag-and-drop will automatically be moved to the configured default folder (if the Firefox built-in bookmarking override is enabled) instead of staying where dragged (moving bookmarks is not affected). Everything else will continue to work as before.

This will be added to the "known issues" list. EDIT: added here.

Questions and answers

  • Why such a long piece to explain the add-on is going to behave incorrectly under one scenario?

Mostly for transparency and documentation purposes. I truly hope this one scenario will not be a blocker for the users, and I understand some will be disappointed. It is unfortunately out of my control at the moment, and this piece helps explain the technical reasons why.

  • Is there any "workaround" to get these values?

Not that I could find. Even if there were, I would have to be very carefully using them- any "hacky" solution would likely not be reliable and at great risk of breaking in the future. I want the add-on to be a stable and reliable piece of software.

  • Could Firefox provide an official access to these flags?

That is possible, although unlikely. Flags like these are sometimes only temporary (I tend to think browser.toolbars.bookmarks.2h2020 will be one of these), and sometimes stay around for a long time (and I think browser.bookmarks.defaultLocation will be one of these). In any case, I would want to use something that I know would be reliable.

  • Are more Firefox internal changes going to cause more issues in the future?

I wish I knew! At the moment, it does not appear so but that is always a possibility. Ultimately, I want the add-on to adapt to the Firefox internal changes rather than fight them. If future changes prevent the add-on from working completely, then my hope is that Firefox incorporates the add-on main feature internally. To be honest, that would be a great scenario.

  • When will the fix be out?

I will release a new major version 3.0 (to indicate the internal changes and the new limitation) very soon, and I hope to have it available on AMO before the official release of Firefox 85 to the public on 2021-01-26. (I am unfortunately later than I would like, as these changes started with Firefox 84, but I have had little time to work on the add-on until now.)

Steps to reproduce the problem

  1. Use either:
    • Firefox 84.x with the browser.toolbars.bookmarks.2h2020 flag enabled.
    • Firefox 85.x
  2. Set a default folder in the add-on settings for the built-in bookmarking system
  3. Try to use the built-in bookmarking system
  4. The bookmark is not created in the default folder selected

Specifications

  • Version of the add-on: 2.13.0
  • Firefox edition: All
  • Firefox version: 84+
  • Firefox language: All
  • Platform/OS: All
  • Platform/OS version: All
@teddy-gustiaux teddy-gustiaux added the type/meta A high-level issue grouping multiple bugs, features or questions. label Jan 23, 2021
@teddy-gustiaux teddy-gustiaux added this to the 3.0.0 milestone Jan 23, 2021
@teddy-gustiaux teddy-gustiaux self-assigned this Jan 23, 2021
@teddy-gustiaux teddy-gustiaux pinned this issue Jan 23, 2021
teddy-gustiaux added a commit that referenced this issue Jan 25, 2021
…provements"

BREAKING CHANGE: bookmarks created by drag-and-drop will automatically be moved to the configured default folder instead of staying where dragged (moving bookmarks is not affected).

This regression cannot be fixed in the current state of the APIs.
Relates to #356, #399 and #400.
@teddy-gustiaux
Copy link
Owner Author

Version 3.0.0 of the add-on has been submitted to AMO for review. Hopefully, it will be approved and start to be distributed before or as the Firefox 85.0 stable update is also going live.

@teddy-gustiaux
Copy link
Owner Author

Version 3.0.0 has been approved and is now being distributed.

@vrubleg
Copy link

vrubleg commented Jan 26, 2021

This issue is a deal breaker. Pity that it can't be resolved. Had to disable the extension =(

You could consider creation a Web Extension Experiment extension for Firefox Developer Edition. It opens full access to internals of Firefox, as it was before Firefox 57 (but can't be distributed from AMO).

@Neytrino-OnLine
Copy link

3.1.0 breaks the Private Bookmarks extension :(

@vasudev-gm
Copy link

vasudev-gm commented Jan 30, 2021

@teddy-gustiaux Dunno if this info will help you or not. Had to disable Default bookmark folder add-on for testing.
with 20h2 bookmark config set to true,

browser.toolbars.bookmarks.2h2020 | true

Had chosen bookmark menu as default bookmark path. Even after restart FF now stores all bookmarks to bookmark menu.

browser.bookmarks.defaultLocation | menu________

if browser.toolbars.bookmarks.2h2020 | false FF/Default bookmark folder will not remember last chosen/selected path in safe mode(the config(bookmarks.2h2020 in safe mode) is disabled, I dunno why) and normal mode too.

I tried it on Ubuntu 20 and didn't test it on Windows. So, default location might change accordingly.

@tokariu
Copy link

tokariu commented Feb 3, 2021

I'm sorry to read the news about the API changes.
not being able to drag'n'drop bookmarks from the address bar to the bookmarks-toolbar-folder is a deal-breaker for me. I have to disable the addon unfortunately. And now I'm lacking an option to make firefox automatically add bookmarks on top of a folder (reversed sort order for ctrl+d added bookmarks, and only for new added bookmarks - not for drag'n'drop added bookmarks added to the toolbar which some other addons do then..)

I can only hope that there is a way to get this addon with previous features working again. I would definitely return using it. but for now.. I'm back to drag'n'drop only bookmarking :/

@Leloup79
Copy link

Leloup79 commented Feb 3, 2021

Thank you for the detailed explanation and - of course - for this useful addon!
The following may or may not be sort of a workaround, but seems to do it for me:

  • I had set default to "bookmark menu"
  • Changed it to FF default
  • Create bookmark using Ctrl+D --> change destination to "bookmark menu" (in my case)
    --> now drag/drop to bookmarks toolbar works, and Ctrl+D uses "bookmark menu"

@Elliott599
Copy link

Can you please provide instructions on how to use about:config to change FireFox set up so that your drag and drop will work? Thank you.

@Leloup79
Copy link

Leloup79 commented Jun 2, 2021

Can you please provide instructions on how to use about:config to change FireFox set up so that your drag and drop will work? Thank you.

If you refer to my comment...as I recall (it was back in February) I did not do changes to about:config. Following my description might be helpful, but I am aware that this worked for my use case, but may not work for others.

@teddy-gustiaux
Copy link
Owner Author

This is a late update (my apologies), but I will be closing this issue as these changes are now a few years in. The browser.toolbars.bookmarks.2h2020 flag has since been removed from about:config (I am not exactly sure when).

Please see issue #553 for more details on the current and future state of the project.

@teddy-gustiaux teddy-gustiaux unpinned this issue Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/meta A high-level issue grouping multiple bugs, features or questions.
Projects
None yet
Development

No branches or pull requests

7 participants