Manually-Sort-Folders icon indicating copy to clipboard operation
Manually-Sort-Folders copied to clipboard

Dev115

Open jobisoft opened this issue 2 years ago • 4 comments

See discussion in #199.

Convert add-on to be more WebExtension-ish by getting rid of the WindowListener API and convert locales to WebExtension locales and options page to HTML.

I am not yet happy with how I handle the SVGs. As stated in comments, WebExtensions cannot use core SVGs because core uses a feature which is not yet standardized and disabled for WebExtensions. The solution tried in this PR is aiming at including the unchanged SVG from core. But performance is bad, so I propose to include "normal" SVG and modify the core ones.

Alternatively, the entire sort UI in the options page could be removed and replaced by context menu entries in the folder pane: move up/down, sort alpha, sort invert alpha, sort normal. This would also solve the issue, that the current PR does not allow to sort subfolder entries (only top level entries) and the UI would need significat updates to support that. Drag'n'Drop for sorting needs an Experiment, which I try to avoid at this stage.

This PR does not attempt to decode the sort order stored in the pref branch, but starts fresh and stores sort order in local storage.

jobisoft avatar Jul 23 '23 12:07 jobisoft

Hi John, do I understand correctly that the ability to have XUL in the options page for an addon is now gone? No more <html xul:xmlns="https://...." ...?

protz avatar Jul 29 '23 23:07 protz

Yes, as part of the conversion step, I removed the WindowListener API and moved the options page from XUL to HTML. The XUL options page was a feature of the WindowListener API, to quickly reduce the fallout of the removed "legacy" overlay support in TB78 and was intended as a short rescue mechanism.

XUL is being removed, so add-on developers, who did not do any further updates after the initial WindowListener API update, constantly have to adapt to the changing/reduced XUL support. To move this project forward and to help identify the real needed WebExtension APIs, I did the HTML conversion now and dropped the WindowListener API.

The XUL tree is indeed one of the biggest native XUL feature, which does not have a direct HTML counterpart. But it is doable of course, either by researching and finding a 3rd party HTML/JS library, which does that, or by implementing a custom solution.

The questions is: do we need it? Would it not be sufficient to directly modify the real folder tree by shortcuts (move up/down) and context menu entries (move up/down, sort alpha, sort invert alpha, sort normal)?

jobisoft avatar Jul 30 '23 07:07 jobisoft

Was this correction fixed on the Supernova?

Jaylo70 avatar Sep 09 '23 19:09 Jaylo70

When removing the await in line 261, I get

Uncaught (in promise) TypeError: preferences.accountSettings is undefined
    load moz-extension://15061fb8-1e4c-4fae-b0f0-ccf7520e6269/options/options.js:299
    async* moz-extension://15061fb8-1e4c-4fae-b0f0-ccf7520e6269/options/options.js:331

htgoebel avatar Apr 22 '24 10:04 htgoebel