Qeole / colorediffs

Thunderbird extension to colorize code diffs in messages.
Mozilla Public License 2.0
24 stars 5 forks source link

Compatibility with Thunderbird 68+ #88

Closed Qeole closed 3 years ago

Qeole commented 6 years ago

The add-on is currently broken for Thunderbird 57+.

Details on the changes here: https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_57.

RIght now I have a version that works on Thunderbird 59 (not pushed to GitHub yet), save for the popup used to set preferences. I push it in the dev branch, but mind that the preferences do not work for now and that the git history of that branch can (and will) change.

Qeole commented 6 years ago

Compatibility of the add-on itself with Thunderbird up to version 60 has been fixed. Known issue: preferences menu is broken with TB 59+.

Since things will probably change again with Thunderbird 61, I don't want to spend too much time fixing the add-on for now. Let's wait and see what the new guidelines will be.

aik commented 6 years ago

Worth mentioning that the settings are actually available in the config editor anyway which is more than enough

marxin commented 4 years ago

I just want to mention that TB 68.0 has been released. Thanks for working on the porting to.

Qeole commented 4 years ago

Yep, I've seen that, thank you.

I am unsure about the best course of action: updating the add-on as a legacy extension, or re-implementing things from scratch. I do not know if legacy add-ons (simply converted from e.g. overlay extensions, as for Colored Diffs, to a MailExtension just by moving to a JSON manifest) will be supported for long. But re-implementing takes time, and I haven't figured how to inject scripts in the message window to change message appearance with the new framework.

Anyway, I'm a bit short on time at the moment. If you really need the extension to work on TB 68+, I experimented some time ago and it seemed to work by moving to the JSON manifest as explained on that page. The option menu remains completely broken, though, but worst case one can use the editor config.

I'll try to update it one way or another eventually...

fbezdeka commented 4 years ago

Hi.

I am unsure about the best course of action: updating the add-on as a legacy extension, or re-implementing things from scratch. I do not know if legacy add-ons (simply converted from e.g. overlay extensions, as for Colored Diffs, to a MailExtension just by moving to a JSON manifest) will be supported for long. But re-implementing takes time, and I haven't figured how to inject scripts in the message window to change message appearance with the new framework.

Why not both? Quickfix: Use the legacy extension as long as the (re-) implementation takes Long term: (Re-) implementation

Thunderbird 68 users would be able to use this extension in the meantime.

marxin commented 4 years ago

Thunderbird 68 users would be able to use this extension in the meantime.

Yes, I can confirm that it's unfortunate that I've just lost the add-on after my update of Thunderbird.

Qeole commented 4 years ago

Hi, sorry for the delay, I've been kept away from computers by family business.

Ok, I understand there is demand for a quick fix, I'll try to cook up and publish something in the next days if I can.

Re-implementation would definitely be longer term anyway.

Thanks for the feedback!

fbezdeka commented 4 years ago

Any updates regarding this topic? Would be very happy to help testing ;-)

Qeole commented 4 years ago

I started to work on it but I'm strugling to find time.

I got colors working but the toolbar at the bottom of the page is broken so we can't toggle colors. I suspect this is because the add-on fails to retrieve the preferences (e.g. what mode, plain/unified/etc is currently being used) and hence to use them. (Option menu also remains completely broken at this time, but this can wait - we have the config editor.)

Will try to get back to it as soon as I can.

johnhubbard commented 4 years ago

Really, really looking forward to this. Arch Linux just finally broke my ability to stay on older Thunderbird versions, so now I'm force-upgraded to 68. And I'm dying here, because as a kernel developer we read patches in email all day long, and your wonderful add-on has trained my brain to look for colors for added and deleted code chunks. :)

I'll be glad to beta or alpha test whenever it's time.

Qeole commented 4 years ago

your wonderful add-on has [...]

Not my add-on :) I just took over maintenance, because original developer is not longer using or mainaining the add-on. See README.md for credits. And for the record I also use it to do kernel development (netdev). And I saw your last patchset :).

Anyway. So I finally managed to take some time to work again on the add-on today/tonight. I didn't achieve anything fantastic, but it seems to load and work correctly for me on the current stable (TB 68.2.2). The toolbar works as expected. The window for choosing the settings remain completely broken, but this is a lesser evil (I removed the button to show that broken window, by the way).

It's not on AMO yet, it's on a separate tb68 branch in my repo, because apparently I have volunteers for testing :) Please give it a try and let me know how it goes on your setups. It should not be too difficult to install:

$ git clone https://github.com/Qeole/colorediffs.git
$ cd colorediffs
$ git checkout tb68
$ make

This should produce a .xpi file that you can use to “install an add-on from file” in Thunderbird's add-on page.

And thanks for the feedback and encouragements! Always appreciated.

johnhubbard commented 4 years ago

Cool! This is a small world sometimes.

The tb68 above works perfectly for me. I worked through about 30 patches in email, and switched between all the options (side-by-side, unified, plain, context) for most of them, didn't see any glitches or problems.

Thanks again for doing this--it's amazing! And a HUGE relief to get my tool flow back, I was starting to panic, haha. :)

fbezdeka commented 4 years ago

Thank you! Works perfectly!

Qeole commented 4 years ago

Great! Thanks to everyone. I'll merge to master and update on AMO sometime this week.

marxin commented 4 years ago

Hello.

I've just verified that it works for me for GCC development ;) About the broken add-on settings: I can imagine having a config file and you can eventually remove the broken TB settings dialog?

Anyway, thank you for working on that!

aik commented 4 years ago

works for me too, thanks mate!

Qeole commented 4 years ago

Merged to master, and in the queue for review on addons.thunderbird.net.

@marxin You can already edit your preferences in <your_profile_dir>/pref.js, but I do not think this is the recommended way to set preferences (at least, avoid to do so while TB is running). And we're all reviewing diffs here, but text config files are not really the usual way to make users change their settings in Thunderbird :).

For now, users should use the config editor (or stick to defaults). I would like to fix the settings page someday… But I gave it a try and it seems complex to fix, so this is probably medium/long term.