Closed Bug 1492003 Opened 6 years ago Closed 4 years ago

Removes usages of jQuery

Categories

(Tree Management :: Treeherder: Frontend, task, P1)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: sclements)

References

Details

Most of these instances can easily be replaced (http://youmightnotneedjquery.com):

treeherder $ rg '\$(\.|\()' ui/

ui/helpers\job.js
84:  const selectedEl = $('.th-view-content').find('.job-btn.selected-job').first();
93:  viewport.top = $(window).scrollTop() + $('#global-navbar-container').height() + 30;
94:  const filterbarheight = $('.active-filters-bar').height();
96:  const updatebarheight = $('.update-alert-panel').height();
98:  viewport.bottom = $(window).height() - $('#details-panel').height() - 20;
119:      $('.th-global-content').scrollTo(el, duration, { offset: scrollOffset });
127:  const jobEl = $('.th-view-content')

ui/job-view\details\DetailsPanel.jsx
332:    $('.pin-count-group').addClass('pin-count-pulse');
334:      $('.pin-count-group').removeClass('pin-count-pulse');

ui/job-view\details\PinBoard.jsx
275:    if (!$(event.target).hasClass('add-related-bugs-input')) {
278:      $(document).off('click', this.handleRelatedBugDocumentClick);
286:      $('#related-bug-input').focus();
303:        $(document).on('click', this.handleRelatedBugDocumentClick);

ui/job-view\pushes\PushList.jsx
260:    const jobs = $('.th-view-content')
268:      const jobEl = $(jobs[idx]);
294:    if ($('.selected-job').css('display') === 'none') {

ui/js\controllers\main.js
146:                            $('#related-bug-input').focus();
168:                            $('#classification-comment').focus();
187:                $('#quick-filter').focus();

ui/job-view\details\summary\ActionBar.jsx
44:          $('.logviewer-btn')[0].click();
75:    $('#retrigger-btn > span').removeClass('action-bar-spin');
78:        $('#retrigger-btn > span').addClass('action-bar-spin');

ui/js\directives\treeherder\log_viewer_steps.js
8:        const el = $('.lv-step[order="' + order + '"]');
13:               parseInt($('.steps-data').first().css('padding-bottom'));
35:                    $('.steps-data').scrollTop(scrollTop);

ui/js\controllers\perf\graphs.js
168:                    date: $.plot.formatDate(new Date(t), '%a %b %d, %H:%M:%S'),
207:                    var tip = $('#graph-tooltip');
248:            var tip = $('#graph-tooltip');
258:                            $(this).css({ visibility: 'hidden' });
311:            $.each($scope.plot.getXAxes(), function (_, axis) {
316:            $.each($scope.plot.getYAxes(), function (_, axis) {
335:            $scope.overviewPlot = $.plot(
336:                $('#overview-plot'),
363:            $('#overview-plot').on('plotunselected', plotUnselected);
365:            $('#overview-plot').on('plotselected', plotSelected);
372:                    $.each($scope.plot.getXAxes(), function (_, axis) {
377:                    $.each($scope.plot.getYAxes(), function (_, axis) {
472:                $scope.plot = $.plot(
473:                    $('#graph'),
511:                $('#graph').on('plothover', function (event, pos, item) {
515:                    $('#graph').css({ cursor: item ? 'pointer' : '' });
532:                $('#graph').on('plotclick', function (e, pos, item) {
546:                $('#graph').on('plotselected', function (event, ranges) {
553:                $('html').click(function () {
558:                $('#graph, #graph-tooltip').click(function (event) {
637:                        thSeries: $.extend({}, series),

ui/job-view\details\tabs\autoclassify\AutoclassifyTab.jsx
234:    $('.autoclassify-error-lines .error-line')[newFirstSelectedIdx]
439:    const elem = $(event.target);

ui/job-view\details\tabs\autoclassify\ErrorLine.jsx
127:      $(`#${this.props.errorLine.id}-manual-bug`).focus();
This is a good call.  I'm trying to remove instances of this as I go along.
Depends on: 1497931
Depends on: 1513560
Depends on: 1426714
Depends on: treeherder-react
Type: defect → task
Depends on: 1541592
Depends on: 1450044
Depends on: 1568913
No longer depends on: 1450044
No longer depends on: 1568913
Assignee: nobody → sclements
Status: NEW → ASSIGNED
Priority: P3 → P1

Sir Can I work on this issue? Here I only have to remove the jQuery Code right ?

Any update ?

Shivansh, we don't usually check bugzilla comments on the weekend. Since this is bug is already assigned you will need to find another one. I suggest looking for bugs with the 'good-first-bug' keyword until you have made several contributions and are familiar with our codebase. You can search for them on bugzilla or see them here. We will assign you only one bug at a time to work on.

Hey :sclements Can I work on this ?

I only need to replace the jQuery code given above in different files to the IE8+ code as in the link . Is that correct? Would love to pull a request and get it fixed.

Shivansh, this bug is assigned to me. Please look for bugs that are not assigned to anyone.

Ok Cool.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.