Novik / ruTorrent

Yet another web front-end for rTorrent
Other
2.03k stars 414 forks source link

Move _noty plugin core with option to disable #2743

Open stickz opened 1 month ago

stickz commented 1 month ago

What would you like changed about the web client?

The _noty plugin which injects jquery.noty.js into the web interface is causing a painful impact to loading times.

Describe the solution you'd like and propose possible alternatives.

I purpose to bring this functionality to the core web interface (instead of a plugin implementation) and create a control to disable it.

Provide information and resources about the environment hosting the web client.

Server: ruTorrent v5.1-Beta2 on Ubuntu 24.04 LTS Web Client: Google Chrome 129.0.6668.59 Installation Method: zip source from version release

Additional context

No response

jevenski commented 4 weeks ago

Bootstrap has a Toast module. We can use it to implement the notification feature, and replace the _noty and _noty2 plugins.

stickz commented 4 weeks ago

Bootstrap has a Toast module. We can use it to implement the notification feature, and replace the _noty and _noty2 plugins.

I disagree with replacing notifications. This would be a massive undertaking. It easier to just move them to core. The biggest issue is them loading as part of a plugin. It's appending content to the DOM instead of just loading in index.html all at once. IMHO, all the jQuery modules required should be in core and initialized as required. This makes sense from a project perspective.

jevenski commented 4 weeks ago

The amount of work won't be anywhere near that of the work we have done in rewriting the project for responsiveness. Add some Bootstrap class names to the elements, and apply a few Bootstrap JavaScript methods if necessary, the rest will be taken care of by Bootstrap itself. The functionality is implemented by Bootstrap internally, so we don't need jQuery noty plugin or reinventing the wheels ourselves.