FMCorz / moodle-block_xp

A gamification plugin for Moodle allowing students to gain experience points and level up.
https://levelup.plus/?ref=github
149 stars 41 forks source link

Transition from YUI to Javascript modules/Jquery #56

Open Canx opened 7 years ago

Canx commented 7 years ago

As stated in Moodle YUI docs, Moodle is abandoning YUI in favor of Javascript modules/JQuery because YUI development stopped in 2014.

I guess this Yahoo announcement wasn't good news 2 years ago...

FMCorz commented 7 years ago

That's right, new JavaScript code should be written using jQuery/AMD. However, so far I've managed to maintain full compatibility from Moodle 2.7, where those were not yet available.

I like only having only one branch to maintain (so long as the code does not get messy), so unless we decide to drop support for older branches, I'd hold onto changing the APIs which make the plugin compatible with a large portion of installations without drawbacks.

As of this day, the plugin is compatible with close to 75% of installs thanks to support down to 2.7. https://moodle.net/stats/

PS: Realistically, I am also uncertain how Moodle can get rid of YUI altogether considering how much JavaScript was written using it.