Closed Bug 1186362 Opened 5 years ago Closed 5 years ago

Drop Hello's use of jQuery from the desktop UI

Categories

(Hello (Loop) :: Client, defect)

defect
Not set
Points:
2

Tracking

(firefox42 fixed)

RESOLVED FIXED
mozilla42
Iteration:
42.2 - Jul 27
Tracking Status
firefox42 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Whiteboard: [tech-debt])

Attachments

(1 file)

I was thinking about some of our dependencies this morning, and realised that I was pretty sure we weren't really using jQuery in the desktop side (we use it in standalone for ajax, although that can come out in a separate bug).

I did a quick bit of investigation, and it appears we can indeed drop jQuery - the only reference in the browser content code or the shared code is now obsolete. Although Backbone can use jQuery, its an optional requirement, and we're not using any Backbone views which would be the bits that use jQuery.
This does what it says. My rough calculations are about a 60k drop in dmg size, and ~300k less used per panel/conversation window.
Attachment #8637131 - Flags: review?(mdeboer)
Comment on attachment 8637131 [details] [diff] [review]
Drop Loop's use of jQuery from the desktop UI

Review of attachment 8637131 [details] [diff] [review]:
-----------------------------------------------------------------

I approve of this patch. jQuery.... **ZAPP**

Next up: Backbone.

::: browser/components/loop/test/shared/views_test.js
@@ -49,5 @@
>      });
>    });
>  
>    afterEach(function() {
> -    $("#fixtures").empty();

not `document.getElementById("fixtures").innerHTML = "";`?
Attachment #8637131 - Flags: review?(mdeboer) → review+
(In reply to Mike de Boer [:mikedeboer] from comment #2)
> ::: browser/components/loop/test/shared/views_test.js
> @@ -49,5 @@
> >      });
> >    });
> >  
> >    afterEach(function() {
> > -    $("#fixtures").empty();
> 
> not `document.getElementById("fixtures").innerHTML = "";`?

I meant to put a comment in when I posted the patch. Its the only place we ever clean out the fixtures, and I took it out and the tests still pass. If we do need to put it back in, then I'd want to put it everywhere, but I think that'd be a separate bug.
Blocks: 1186396
https://hg.mozilla.org/mozilla-central/rev/09335355b962
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
If there are any plans to uplift this patch to other branches please modify CLOBBER - we hit some packaging errors in opt universal builds.
You need to log in before you can comment on or make changes to this bug.