Zutilo icon indicating copy to clipboard operation
Zutilo copied to clipboard

Zotero 7

Open wshanks opened this issue 2 years ago • 29 comments

From the Zotero developer documentation:

All Zotero plugins will need to be updated for Zotero 7.

Zotero 7 plugins continue to be based on the legacy XUL/XPCOM Mozilla extension framework that provides full access to platform internals, but the Mozilla platform itself no longer supports this framework. All Firefox extensions are now based on the much more limited WebExtensions API shared with Chrome and other browsers, which provides sandboxed APIs for common integration points.

We have no plans to make similar restrictions in Zotero. However, due to the Mozilla platform changes, some integration techniques are no longer available, and all plugins will need to change the way they register themselves in Zotero.

I haven't tried to scope out how much work this requires. Luckily Zutilo is already a bootstrap extension so some of the transition steps have already been done. @qqobb do you have any interest in working on this? Since there has not been much activity in the repo recently, I think it would be simplest just to do a clean transition and not try to support 6 and 7 in the same branch.

wshanks avatar Feb 16 '23 19:02 wshanks

I haven't looked into the Zotero 7 update either. I can try to help with the transition, but I'm not sure how much I'll be able to do. Let's see if there's a good way to collaborate.

There are also a few minor (old) commits which I could still add to the Zotero 6 branch of Zutilo. I'll try to create related PRs this weekend.

qqobb avatar Feb 17 '23 16:02 qqobb

Just to say that it would be great to have it compatible with v7

SR-- avatar May 25 '23 07:05 SR--

Will it be compatible with zotero v7? Zotero 7 beta was released.

redleafnew avatar May 29 '23 00:05 redleafnew

I made an attempt at following the plugin transition guide for Zotero 7 in the zotero7 branch. The current status is that it is possible to install the xpi file. However, some of the Zutilo code uses deprecated API's, so besides seeing Zutilo show up in the preferences pane and the Addons Manager all it does is produce errors right now. Definitely do not install it in a profile you care about because it currently makes the Tools menu unusable which then makes it difficult to open the Addons Manager and remove it.

In the best case scenario, there are just some deprecated function calls that be easily migrated to new functions. It is possible though that Zutilo could rely on something that does not have an easy replacement and more work is needed to update it. The next step is to run Zutilo, check the error console, address the error, and repeat until it gets to a usable state or a bigger issue is discovered. I can't make any guarantees about a timeline for getting Zutilo to work with Zotero 7. Others are welcome to try doing more work on the update if they want to.

wshanks avatar Jun 02 '23 19:06 wshanks

I played with it some more. I fixed the mangling of the Tools menu, so now it is safer to test because you can access the menu to remove it.

I also updated some other deprecated function usage. Now, the default item menu items (copy tags, paste tags, copy item, relate items) are all working. The preferences pane is not working. The next thing to do is get the preference pane working so that the other menu items / shortcuts can be tested.

wshanks avatar Jun 02 '23 20:06 wshanks

Thanks for your hard working.

redleafnew avatar Jun 03 '23 00:06 redleafnew

There was some interesting discussion regarding issues with Zotero7 transition on BetterBibtex repository, migh be useful; Is there any beta release to try and test?

danieltomasz avatar Jul 25 '23 13:07 danieltomasz

There was some interesting discussion regarding issues with Zotero7 transition on BetterBibtex repository, migh be useful; Is there any beta release to try and test?

No, I made one push of working on it back in June, but I have not come back to it so far. There is a zotero7 branch in the repo that has my latest attempts, but it is not working. I had asked some questions on the zotero-dev mailing list and got some replies, but I hadn't used those replies to get further so far.

wshanks avatar Jul 25 '23 17:07 wshanks

Thanks for your hard working.

xuxinliang avatar Aug 27 '23 16:08 xuxinliang

Thanks for your attempts at the update. As increasing numbers of developers are refusing to work on their addons for zotero 6 because it's near the end of its life, I am beginning to hold hope that those addons I consider core to Zotero usability will be ported to Z7, and a m particularly hopeful Zutilo will make the list.

huachuman avatar Oct 25 '23 09:10 huachuman

I certainly appreciate all your hard work on this and also how much more difficult it will be to fix, given that the framework is now very much more restricted. To take the pressure off a little (and I hope this does not come across as unappreciative of your efforts), I have found a workaround for the most important function that Zutilo provided for me: copy item link. This functionality is now also provided by https://github.com/windingwind/zotero-actions-tags and is compatible with Zotero 7. It is a bit finicky to work with the provided Javascript action scripts, and some will be uncomfortable with allowing 3rd party Javascript to interact directly with their machine. But it does work. Thanks again for all your hard work.

topps avatar Feb 12 '24 18:02 topps

hi @topps if you need just (markdown) link, you can try use a markdown zotero translator as a workaround https://github.com/silentdot/zotero-markdown-translator/tree/main

danieltomasz avatar Feb 12 '24 18:02 danieltomasz

Has there been any progress on this? I'm looking at switching to zotero for reading papers and being able to use proper keyboard navigation would be a huge plus

justinbrbooth avatar Feb 26 '24 16:02 justinbrbooth

Zotero 7 has been released. @wshanks: Can I help with upgrading somehow?

bjohas avatar Aug 09 '24 07:08 bjohas

Yeah, I tried installing on Z7, but it seems to be disappearing on Z7 restart.

SR-- avatar Aug 09 '24 11:08 SR--

Yes, plugins don't work for z7 by default but need to be explicitly upgraded....

bjohas avatar Aug 09 '24 12:08 bjohas

Naturally, I have used the 'addon' content from the 7 branch as advised. The plugin loads OK but then does not reload on Zotero restart.

SR-- avatar Aug 09 '24 13:08 SR--

Thanks for your continued development work. As a heavy user of Zotero, I am eager to have a Z7 compatible Zutilo as soon as possible. (At least in the meantime I can still use Zutilo in Z6)

joelparham avatar Aug 09 '24 19:08 joelparham

@bjohas Yes, any help would be appreciated. On the zotero7 branch, I have done enough to get the plugin to load and have some functionality. It is able to add items to the item context menu and some of them work at least. I haven't tested all items, but I noticed at least paste tags did not work because it could not read from the clipboard but copy tags did work. The preferences window/pane is currently not accessible. It would be nice to fix that to make testing and using the plugin easier (but one can edit the preferences directly in the Firefox config editor). In a quick test, keyboard shortcuts did not seem to work but I haven't looked at them much yet (it would be nice to get the preferences UI working first).

wshanks avatar Aug 09 '24 22:08 wshanks

https://github.com/windingwind/zotero-plugin-template Using this framework makes development easier?

llity avatar Aug 10 '24 00:08 llity

I don't think that template helps because Zutilo is already written. https://www.zotero.org/support/dev/zotero_7_for_developers has a good guide for updating a plugin from Zotero 6 to Zotero 7. It just takes time to work through the changes.

I just pushed a change that gets the item menu preferences to appear in the Zutilo pane of the preferences window. It doesn't look great but it is functional and should make it easy to test which functions work. The main remaining steps to take for the Zotero 7 update are:

  1. Test each function to see if it still works and fix the broken ones (some might not make sense any more with the changes to Zotero).
  2. Convert the dtd files to ftl so that the strings appear properly in the preferences pane.
  3. Turn on the keyboard shortcut code (just commented out right now) and see if it works.

wshanks avatar Aug 10 '24 12:08 wshanks

@wshanks - I'll have a look. It won't be fast, but with some colleagues we'll do some testing and see what we can fix.

bjohas avatar Aug 10 '24 13:08 bjohas

Thanks, @dcrizz! I used your paste code in d89ad53. I didn't use the copy code since copy was already working. I am not sure if it is safe to rely on Zotero.Utilities.Internal though -- maybe we need to copy the code into Zutilo.

@bjohas Thanks -- if you want, you can post any progress as PRs like another user did in #270. I will keep chipping away at things as well and pushing to the zotero7 branch.

wshanks avatar Aug 11 '24 13:08 wshanks

I made some more changes to the zotero7 branch. Now all of the context menu items work like they did with Zotero 6. There is one issue I am trying to fix still -- some of the strings in the preferences pane always show in English instead of the translation when it is available.

I might make a new release with this functionality for Zotero 7. I haven't looked much at the keyboard shortcuts yet. They might require more work to update. The shortcut code is based on the old KeyConfig Firefox addon. I have used that in other contexts and had to switch to something else in higher versions of Firefox like Zotero is using now.

wshanks avatar Aug 13 '24 22:08 wshanks

I would like to mention that there is a pb with zotero 7 branch (besides the fact shortcuts simply doesnt work, isn't it?): when I open a pdf in the pdf reader, i cannot select and copy text within the pdf using ctrl+C shortcut. It still works if the pdf is opened in a separate window (and not tab). It is very boring. If you change it you're my (wo)man! thks

TommyJazz93 avatar Aug 26 '24 19:08 TommyJazz93

@TommyJazz93 So Zutilo is interfering with pdf shortcuts in Zotero 7? Strange -- something to look into more while working on the Zotero 7 updates.

wshanks avatar Aug 27 '24 16:08 wshanks

Thanks, @Dcrizz! I used your paste code in d89ad53. I didn't use the copy code since copy was already working. I am not sure if it is safe to rely on Zotero.Utilities.Internal though -- maybe we need to copy the code into Zutilo.

@bjohas Thanks -- if you want, you can post any progress as PRs like another user did in #270. I will keep chipping away at things as well and pushing to the zotero7 branch.

Sorry for the late reply!! No worries, to be honest, I don't know what I am doing really, I just messed around with it the original action tag a bit and got GPT to correct any errors I made!! I am not actually very competent at this stuff!!

Dcrizz avatar Aug 29 '24 07:08 Dcrizz

Hi, zutilo is indispensable to me :) As it is not - for the moment - compatible with Zotero 7, I've kept version 6.0.36 "under wraps" to continue using it. But this morning the same incompatibility message appeared with 6.0.36, and indeed it doesn't work any more? No doubt linked to the future version for Zotero 7.x? Good luck to the developers for their excelent work...

regis586 avatar Aug 29 '24 08:08 regis586

I deleted the extension and reinstalled it with Zotero 6.0.36..and zutilo works (fine..) again...

regis586 avatar Aug 29 '24 08:08 regis586

I use Zutilo for tag management all the time and It would be great if a version working on Zotero 7 becomes avalaible. Thanks for all the good work.

Best,

Glenn

glennsandstrom avatar Sep 23 '24 07:09 glennsandstrom