I have been attempting to port Zutilo to Zotero 7 recently. The most recent version of the ported code is
here as I write this (and is generally on the zotero7 branch).
One thing I am a little bit stuck on now is that Zutilo was building its preferences window dynamically before. I followed the guide to convert the window into a pane in the main preferences window. That worked okay, and I can see the Zutilo preferences UI elements now. However, the UI is not linked to the underlying preferences. I think the problem is that
_initImportedNodesPostInsert here gets called before the javascript code that builds the Zutilo UI. There is a mutation observer that seems like maybe it should catch the preference attributes that Zutilo's code adds dynamically, but if so then it is not working.
Should the Zutilo preferences UI work as it is currently built (meaning something in Zotero should be updated)? If not, I think my choices are either to add code to Zutilo to keep the preferences synchronized or use a templating engine to generate a static xhtml file from the list of preferences (they don't change during run time; I just don't want to manager them manually).
Also, if anyone looks at my Zotero 7 changes and notices anything off, I would like feedback. I followed the transition guide but otherwise I feel a bit out of the loop on best practices. Also, I have not looked at Zutilo's keyboard shortcut features yet. They use Keyconfig code and Keyconfig stopped working in Thunderbird when it jumped this high in Firefox version number, so I expect breakage.
Some other random feedback. I could open issues if that would be helpful. None of these things were blockers but they just compounded on one another to make debugging somewhat annoying:
1. The Zutilo preferences pane does not disappear when I uninstall Zutilo. I am not sure if I am missing an unregistration clean up step. PreferencePanes.unregister has a comment that says it is called automatically. If I reinstall in the same session, I see two pref panes with the same content. Also, if I change the name of the preferences file and its path in the src argument to PreferencePanes.register, I don't see the new content of the new file loaded until I restart Zotero (originally, I had preferences.xhtml while the tutorial had prefs.xhtml which I used for PreferencePanes.register; that seemed to really confuse things even worse than this until I created a clean profile, though the only part I could recreate is what I just described).
2. Because I was seeing some weird behavior alluded to above, I started testing with a clean profile each time. It would be nice if there were command line flags to skip opening the Zotero web page and asking about the LibreOffice plugin on first start. (Also, nice to have a flag to create a new temporary profile).
3. I couldn't get the method of putting file in extensions/ with the path to the directory with the extension to work (I was building the xpi and then unzipping it to a directory; Zutilo has some files generated by a make file that make it hard to use the path to the addon/ directory in the repo).
4. The js console can't be displayed on top of the Add-ons Manager or the Preferences window. This is kind of annoying when trying to debug preferences code that I keep reinstalling from the Add-ons Manager.
5. The Run Javascript window has a lot of graphical glitches (under GNOME with Wayland).
6. Closing one of Zotero's windows loses the app's focus. So I have Firefox open and then Zotero with the main window, preferences window, and Add-ons Manager window all open. Closing the Add-Ons Manager causes Firefox to be in focus rather than the Zotero main window or the preferences window.