Electron TODOs - where are they?

243 views
Skip to first unread message

Max Suica

unread,
Jul 20, 2019, 5:54:56 PM7/20/19
to zotero-dev
Hi all,

I'd like to hop aboard the electron conversion effort. How should I go about that?

So far I've:

- Reviewed the github.com/zotero/zotero.git commit log
  - there was an electron branch in 2018, but it went silent ~10 months ago
  - last commit mentioning Electron is from January
  - it's not currently clear which commits/branches are dedicated to electron

- Reviewed the issue tracker of same repo
  - there are 3 electron issues dated 2018
  - github issues is not tracking any electon roadmap, milestones, todos, or project boards

- Reviewed zotero user forum + zotero-dev
  - Lots of tangential "when we move to electron" mentions
  - no "help needed" or "low hanging fruit" that I can sink my teeth into as a new contributor

I have found some PRs like https://github.com/zotero/zotero/pull/1636, which /might/ be related to electron, but they're not very clearly linked to the task, and are not very discoverable as electron work (that link was dropped by emiliano in a discussion about moving away from XUL).

Questions:
- Is there any public location where a new contributor can get a high level view of the current plan and tasks in the conversion project?
- What are some of the keywords you use to search and track the current effort? Where do you search for them (zot-dev? gh-PRs? Other)?

Thanks,
Max Suica

Dan Stillman

unread,
Jul 20, 2019, 10:30:35 PM7/20/19
to zoter...@googlegroups.com
On 7/20/19 5:23 PM, Max Suica wrote:
> I'd like to hop aboard the electron conversion effort. How should I go
> about that?
>
> […]
>
> Questions:
> - Is there any public location where a new contributor can get a high
> level view of the current plan and tasks in the conversion project?
> - What are some of the keywords you use to search and track the
> current effort? Where do you search for them (zot-dev? gh-PRs? Other)?

Thanks for your interest here!

We've done some work internally to get a sense of the best path forward
for getting to Electron — mostly involving shimming Mozilla XPCOM
interfaces (e.g., nsIFile) and/or Zotero functions (e.g.,
Zotero.File.getContentsAsync()) so that we can avoid rewrites and
minimize the amount of time we have to have an active Electron branch
for the main code base — but most work on that front is premature and/or
counterproductive at this point.

The top priority currently is converting the entire UI from XUL to HTML,
mostly using React. That's underway — the tag selector is completely
changed, the collections tree and items tree are underway, and the item
pane and preferences are next — but there's a lot to do.

If this sort of thing interests you, that'd be a great place to start,
and the benefit is that the code would roll out to production as soon as
it was done instead of at some indeterminate point in the future. For
simplicity, we're trying to keep things mostly pixel-identical at first,
but this work will allow us to start modernizing the design
independently of the switch to Electron.

We've been taking this component by component, and we haven't yet made
firm decisions on everything (e.g., SASS vs. CSS-in-JS). In some cases,
we need to come up with primitives that can be used across components
(e.g., a generic replacement for the XUL 'wizard'). Some things we can
adapt from work on the new Zotero web library [1], though due to
differing requirements we're unlikely to directly share much code.

Architecturally speaking, the plan for most components is to separate
them into 'containers', which will call into the data layer and receive
change notifications via Zotero.Notifier, and 'components', which should
ideally receive data entirely via props (which means, among other
things, that they could potentially be developed outside of Zotero using
something like nwb). You can see an example in the tag selector [2] [3]
[4]. That code uses classes, but new code should probably use React Hooks.

If it'd be helpful, we can go through and create issues for each window
or component that needs to be changed, which can also serve as areas for
implementation discussions. But off the top of my head, something very
simple and isolated like the export options window [5] would probably be
a good starting place. The import wizard [6] would be another good one,
though that's an area where we may want to figure out a more general
solution (probably starting with seeing what Mozilla is doing to replace
the XUL 'wizard').

If you're interested in working on a specific part, create an issue on
GitHub and we can discuss further there. Thanks again!

- Dan

[1] https://github.com/zotero/web-library
[2]
https://github.com/zotero/zotero/blob/master/chrome/content/zotero/containers/tagSelector.jsx
[3]
https://github.com/zotero/zotero/blob/master/chrome/content/zotero/components/tag-selector.jsx
[4]
https://github.com/zotero/zotero/blob/master/chrome/content/zotero/components/tag-selector/tag-list.jsx
[5]
https://github.com/zotero/zotero/blob/master/chrome/content/zotero/exportOptions.xul
[6]
https://github.com/zotero/zotero/blob/master/chrome/content/zotero/import/importWizard.xul

Emiliano Heyns

unread,
Jul 23, 2019, 5:13:12 PM7/23/19
to zotero-dev
I'd be very interested to know what ideas exist around a replacement for XUL overlays -- that was previously the simplest way to hook stuff into the Zotero UI or add to the UI (elements, menu options, etc), and I'm not familiar with something similar for React/JSX.
Reply all
Reply to author
Forward
0 new messages