Two-pane bookmark manager for Firefox on ExtJS

Greetings habrazhitelam. I would like to talk about my extension and ask for a little help.
The extension is called Total bookmarks, because its interface is almost completely borrowed from Total commander.

image


Why did you need to do it at all?


Indeed, many people put bookmarks in pre-created folders and never encounter blockages that are hard to find. Unfortunately, at one point, I realized that I did not belong to them. If I come across an interesting article that I have no time to read now, then I put the bookmark right in the root so as not to forget, and then I forget about the article itself and the bookmark. And once, scrolling through the list of bookmarks for about 15 seconds, I realized that it was time to deal with this blockage. The problem was that the standard Firefox interface was completely unsuitable for such tasks. For example, if I want to move important bookmarks from the end of the list to the beginning, I have to drag them with the mouse for 15 seconds or more. And considering how many bookmarks I have accumulated, the whole process could take hours at that pace. The only convenient interface in this situation seemed to me to be the two-panel TC interface, but I could not find any realizations of it on the Internet. Actually, being so lazy before stupid and tedious work of dragging bookmarks with the mouse made me spend much more time on more intellectual work that would solve the problem once and for all.

Why is such a strange (and many say braking) choices like ExtJS?


The fact is that the standard XUL, although fast, is extremely poor and non-expandable. For example, I needed a table whose lines can contain multi-line text with different formatting for each of these lines. The Firefox bugtracker even has a task: to make the rows of a table multi-line, but it has been hanging there for many years, and you cannot add such support yourself. In addition, in terms of the richness of the component palette, some other library is unlikely to compare with ExtJS. Well, and besides, at that moment I was just mastering it in connection with another project.

Of course, ExtJS has one serious drawback, which significantly spoils life. And I'm not talking about the slowdown that the developers themselves are struggling with, and if used correctly, that can be minimized or even hidden. I’m talking about Sencha’s unspoken policy: do not release a release until a fixed (and not so insignificant) number of bugs are added to the project that you, as a library user, will have to deal with yourself. Even if you are actively writing bug reports, you should not think that with the release of the new version, something will change, because *cm. unspoken company policy :)
Nevertheless, the pros outweigh the cons.

About Functionality


Almost all the functionality is visible in the screenshot. The extension is mainly intended for convenient manipulation of bookmark groups. I will list some key points:
  • Work can be carried out completely from the keyboard, because there is a bunch of hot keys for all occasions.
  • Work can only happen with the mouse, because there are drag & drop and checkboxes in each row.
  • It is possible to open a group of bookmarks more conveniently than in the standard interface (since there is either one element or the entire folder).
  • In addition, the behavior that was always annoying in TC was changed: the selection from the lines is not removed if you move to another folder; it is also possible to open the same folder in the next panel with the same click as in the current one.
  • The extension monitors changes in the composition of bookmarks and is automatically synchronized, so you do not need to follow this. In addition, due to the buffering of all changes, there are no problems or noticeable brakes when working with other extensions like Xmarks.

Separately, I just want to note that testing for macOS was done after almost all the functionality was ready (more precisely, on the hackintosh under the virtual machine, because there was no poppy at hand) and noticed that the F9 assigned to delete in the poppy was already occupied by something system, therefore, macros will need to press ctrl again. If someone doesn’t intercept F9, then it will work like on other axes.

A bit about implementation


As you know, most JS libraries cannot be used directly in XUL. There are some forks for jQuery, etc., but all this is far from a stable result. However, there is a way out for those extensions that do not interact through plug-in libraries with the XUL part of the interface. You just need to create an iframe on the whole window and work with regular html and familiar JS libraries in it.

For assembly, the Mozilla documentation suggests using make, but since I had worked with gradle before, I used it. I think that it is more convenient in any case, since you can connect standard java libraries directly in the script. In my case, I don’t even know on what else it would be possible to implement the assembly without writing separate utilities, because I had to make a simple SenchaCMD replacement for the reason * see Sencha's unspoken policy.

What I wanted to ask Habr


To my great disappointment, I have not been able to post my extension to addons.mozilla.org for two months now . It all started with the fact that automatic tests when loading the extension fell due to the use of ExtJS. This was corrected immediately after talking with the editors. Then I waited in line for a couple of weeks and the extension was rejected, because I forgot to attach the source. Then a couple of weeks passed due to the fact that I did not immediately understand how to start the scan again. My questions were not answered quickly, and the language barrier affected. Some letters remained unanswered. But that’s not the point, it’s clear that the editors have a lot of work to pay due attention to.

After the last check, I received a letter with the following answer:
Familiarize
Your add-on, Total bookmarks 2.2.201308201235, has been reviewed by an editor and did not meet the criteria for being hosted in our gallery.

Reviewer:
Kris Maglione

Comments:
Your version was rejected because of the following problems:

1) Your add-on creates DOM nodes from HTML strings containing unsanitized data, by assigning to innerHTML, calling document.write, or through similar means. Aside from being inefficient, this is a major security risk. For more information, see developer.mozilla.org/en/XUL_School/DOM_Building_and_HTML_Insertion

2) Your add-on uses the 'eval' function or Function constructor unnecessarily, which is something we normally don't accept. There are many reasons * not * to use 'eval', and also simple alternatives to using it. You can read more about it here: developer.mozilla.org/en/XUL_School/Appendix_C : _Avoid_using_eval_in_Add-ons

This version didn't pass full review because of the following issues:

1) This completely freezes my browser.

Please fix them and submit again. Thank you.

This version of your add-on has been disabled. You may re-request review by addressing the editor's comments and uploading a new version. To learn more about the review process, please visit addons.mozilla.org/developers/docs/policies/reviews#selection

If you have any questions or comments on this review, please reply to this email or join # amo-editors on irc.mozilla.org
- Mozilla Add-ons
addons.mozilla.org

In short: the browser just hung up on the editor. The problem is that I tested on many machines, on different OSes, and at the same time, everything worked without problems for both me and my friends. Therefore, for such a report as “everything is lost and nothing works”, I absolutely do not understand where to look for the problem. Perhaps the editor had a conflict with some samopisny extension (he has about 14 of them and part for checking the work of extensions).

In general, I will be extremely grateful if someone can hang their browser with my extension and give feedback on this. Otherwise, I can’t post the addon on the Mozilla site.

Repository
bitbucket.org/cs0ip/total-bookmarks

If you can not write a feedback in a comment or PM, then write here: cs0ip@ya.ru

upd: Less than a year has passed (at least a little more ...):
addons.mozilla.org/firefox/addon/total-bookmarks

Also popular now: