See https://github.com/scitedotai/scite-zotero-plugin/pull/26
I believe the process for you will be very similar, given that the scite plugin seems to have borrowed a lot of ideas from your plugin.
Sorry I didn't modify BBT, but there's no development instructions in the README.md and it's a much bigger and more intimidating plugin to work with.
If you have any questions shoot me a message here and we'll try to respond ASAP. Dan will release a build on the dev channel later today.
I use a bundler to package in npm modules. I will see if I can convince it to not replace some "require" calls, but my code does a ton of require calls for npm modules.
I also use overlays to "start" BBT. Must I migrate to a restartless plugin? I've tried that before and it was looking to be a substantial project.
I take it it won't be possible to have a single source be compatible with the current and the upcoming release? When I ported to Zotero 5 having to keep two very divergent source trees working was a significant hurdle.
If you have any questions shoot me a message here and we'll try to respond ASAP. Dan will release a build on the dev channel later today.What branch does the current zotero sit on? I need to look in the source sometimes to find out how things work.
On Thursday, 26 August 2021 at 19:15:53 UTC+3 Emiliano Heyns wrote:I use a bundler to package in npm modules. I will see if I can convince it to not replace some "require" calls, but my code does a ton of require calls for npm modules.I ran into the same issue when converting the scite plugin as I am not too familiar with webpack config. I found a more clean solution, but if worst comes to worst you can do it with `eval('require("zotero/itemTree")')`.
I also use overlays to "start" BBT. Must I migrate to a restartless plugin? I've tried that before and it was looking to be a substantial project.Scite does too and it didn't create problems.
I take it it won't be possible to have a single source be compatible with the current and the upcoming release? When I ported to Zotero 5 having to keep two very divergent source trees working was a significant hurdle.Yes, but it shouldn't require divergent sources here. You can put the old patching code under `if(typeof Zotero.ItemTreeView != "undefined")` and the new code in the else clause.You can keep the column spec in the overlay files for the XUL tree, and you'll specify the columns for the HTML tree in the monkey-patch.
Doing this conversion and seeing the amount of monkey-patching that is required for extension developers has also lead to some discussions internally about the fact that for certain common plugin actionssuch as editing the item tree, item pane, adding context menu items and perhaps some others we shouldn't expect plugin developers to monkey-patch methods as that is quite dangerous and may break our ownUI if done incorrectly, or as a result of a change to our own interfaces and also is too complicated for plugin developers. We'd like to have dedicated APIs for at least the most common extension needs,under Zotero.Extension or similar. This is not going to happen in the coming months, but we'd like to say that the current way to extend the item tree is temporary and we'll have a more robust solution.
Also to update the future technology roadmap. The plans to move to Electron are currently on hold. We'd first like to update to at least Firefox 78 ESR and eventually a current Firefox build. That is not happening for theZotero 6 release (the PDF reader) but is the nearest change that will have an overall impact on the architecture of Zotero. Most importantly, Firefox 78 no longer supports XUL overlays, but there will probably be moreimplications for extension developers. We hope to address some of them with a new Extension API too. We'll have more info on this as we are closer to the transition.
But with the change to ESR 78, I will need to move to restartless, since you mention that that no longer has XUL, correct?
My main worry is that my time for large projects has really shrunk over the past few years; something like the port to Zotero 5 would be harder to allocate time for now, and that already was a massive undertaking for me at the time. I think my main hurdle then was that I couldn't chunk the work into parts I could reasonably oversee, finish, and test.
Just to echo Adomas, while upcoming changes — most notably XUL overlay
removal — will require some work, asyncification really was a special
case, due to its viral nature within a codebase. So don't use that as
any sort of benchmark for what to expect here.
Unlike the async changes, which avoided UI freezing but otherwise
weren't particularly rewarding, these changes will enable all sorts of
future functionality. The items list has already gained a fun new
feature and some bug fixes with this change, and there are many things
that we and plugin developers will now be able to do that weren't
possible before (e.g., showing search results in the middle pane). So
hopefully it won't just be work to remain in position.
(Also, minor terminology note: the change here was to an HTML tree. It's
partially React-based, with some custom performance optimizations, but
"JSX" isn't really relevant.)
--
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/yi4olucA_vY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/7e54c6ea-ba9f-4c4a-837d-a283bb7130f4n%40googlegroups.com.