close
Skip to content

Upgrade jquery version to 3.6#2236

Merged
Novik merged 9 commits into
Novik:masterfrom
stickz:jquery-upgrade
Dec 29, 2021
Merged

Upgrade jquery version to 3.6#2236
Novik merged 9 commits into
Novik:masterfrom
stickz:jquery-upgrade

Conversation

@stickz
Copy link
Copy Markdown
Collaborator

@stickz stickz commented Dec 25, 2021

This pull request upgrades the jquery version to 3.6. There is a noticeable improvement in page loading speeds.

It also upgrades jquery.filedrop to the latest version. This fixes a bunch of bugs and makes it compatible with jquery version 3.6.

@Novik
Copy link
Copy Markdown
Owner

Novik commented Dec 25, 2021

This is not such easy.
For example, only one moment:

Deprecation Notice: The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callbacks are removed as of jQuery 3.0. You can use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.

And what we have in the js/rtorrent.js?

For correct migration we should use jquery-migrate-plugin. Check this -
https://jquery.com/upgrade-guide/3.0/#jquery-migrate-plugin
https://github.com/jquery/jquery-migrate/#README

@stickz
Copy link
Copy Markdown
Collaborator Author

stickz commented Dec 25, 2021

I'm still working on this jquery upgrade. It's going to take a few days to fully complete. I am using the jquery-migrate-plugin.

Comment thread js/rtorrent.js Outdated
@stickz
Copy link
Copy Markdown
Collaborator Author

stickz commented Dec 26, 2021

@Novik This pull request is ready for review again. I removed all the warnings from jquery migrate and resolved all the combability issues with JQuery version 3.6. Page loading speeds are slightly faster now which is great.

There is still some deprecated features used. They're not easily replaceable. It's not recommended, but it still works perfectly fine. An example of this is jQuery.type(), which is often used as $type() in the code. typeof doesn't work in every situation.

I came across some issues with error handling, while I was thoroughly testing this upgrade. The dbody container (which stores all the torrents) became null. This was due an issue with plugins not having adequate canChange permissions in plugins.ini. I had to clean up the chain reaction of errors. They were interfering with my ability to test this JQuery upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants