ProTipHQ / ProTip

A browser extension for tipping, donations, and peer-to-peer crowd-funding
https://protip.is
GNU General Public License v3.0
96 stars 15 forks source link

Remove jQuery UI dependency #19

Closed bnvk closed 6 years ago

bnvk commented 6 years ago

ProTip currently uses Bootstrap and jQuery UI, since the later is rather large in file size and most of it's features handled in Bootstrap, it makes little sense to keep jQuery UI. Should be pretty trivial to remove, as it seems very little of the app uses it.

bnvk commented 6 years ago

As far as I can tell, jquery-ui was added in 8bd3ea4d612b47c612809b6dc01a3fa30b8db3c7 to replace bootstrap-slider and is only used for the currency slider when choosing a weekly donation amount

2018-02-28-180810_1366x768_scrot

The slider only goes from $1 - 10 and if a user is feeling generous and puts more than $10 / week the slider becomes maxed out and useless. I think it is hard to justify keeping jquery-ui or spending time to replace it with something lighter weight. @MrChrisJ @Enegnei have any thoughts on this?

jQuery UI was also uses $.effect() in the following places

controllers/home.js:99:     $('#date-end-of-week').effect("highlight", {
controllers/home.js:140:   $('#payment-history').effect("highlight", {
controllers/home.js:157:   $('#payment-history').effect("highlight", {
controllers/home.js:224:   $('#balance-covers-weeks').effect("highlight", {
controllers/popup.js:53:    $('#days-till-end-of-week').effect("highlight", {

The specific effect used was:

$('#date-end-of-week').effect("highlight", {
       color: 'rgb(100, 189, 99)'
}, 1000)

Again still did not seem like a valid tradeoff and this should probably be re-done using CSS animations anyway. Just leaving this comment to maybe do such things later.