XUL vs React

Skip to first unread message


Apr 22, 2019, 5:14:09 PM4/22/19
to zotero-dev
I have finally managed to put together a working prototype of a plugin. The plugin fulfills its basic purpose, i.e. looking up locations in our library catalog, saving the results and addingg tags based on the results. But it is still far from perfect, and the experience is rather raw, there are no such things as progress windows, you can't customize tags, and so on...

Now, just like most (all?) other plugins the plugin is based on the XUL technology, but my knowledge is too limited for adding features like those mentioned. Would it be a good idea to learn XUL for this? If my understanding is correct this infrastructure will become obsolete when Zotero will finally move to Electron, and that some parts of the code base are already in the process of being refactored using ReactJS. So I should perhaps better invest my time in learning Electron or ReactJS...? Is this something I could already use now or will I have to wait for when Zotero makes the move to Electron?

Dan Stillman

Apr 22, 2019, 5:31:22 PM4/22/19
to zoter...@googlegroups.com
I would strongly recommend against doing anything new in XUL.

As you say, React is already in use in Zotero — the tag selector in
production is built using React, and a React collection tree is almost
ready. These use standard React/HTML. As long as you limit your
dependencies, Electron isn't a dependency here.

The main catch is that we don't yet have React versions of some of the
core UI building blocks, but you can rely on built-in functions for some
things, like progress windows:


(That currently requires bundled localized strings, but we can change that.)

Denis Maier

Apr 22, 2019, 5:50:51 PM4/22/19
to zoter...@googlegroups.com
Ok. So it'll be React. What about adding a a new Hello World example plugin to the docs?

You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/xYC0I8JaUAI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
To post to this group, send email to zoter...@googlegroups.com.
Visit this group at https://groups.google.com/group/zotero-dev.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
0 new messages