Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nod_’s picture

use .on/.off

filter.js
Untangle this crazy chained selector.

filter.admin.js
don't need context to select ID.
remove the sizzle-specific things can be done with regular js or a .prop/.attr
don't triggerhandler, only calls 1 event if more are bound to it it won't work.

Jelle_S’s picture

Status: Active » Needs review
FileSize
3.13 KB

Let's see...

nod_’s picture

tag

seutje’s picture

Status: Needs review » Needs work
+++ b/core/modules/filter/filter.jsundefined
@@ -7,15 +7,16 @@
+    var $header = $guidelines.once('filter-guidelines').find(':header').hide();

would be nice if we could also get rid of that :header sizzle-specific selector. You can just straight replace it with h1, h2, h3, h4, h5, h6 afaik.

InternetDevels’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
3.36 KB
nod_’s picture

Status: Needs review » Needs work

Thanks for the patch!

For the variable declaration, it is currently up to the standards so there is no need to replace them (we have several var declaration, one variable per line).

See #1778828: [policy, no patch] Update JS coding standards for latest standards (and if you can help out the issue that'd be great!).

Can you also replace .once('filter-status', function () { with .once('filter-status').each(function () { I want to simplify the .once() function down the line and remove the second parameter #2180921: [META] Use data attributes rather than classes wherever possible.

InternetDevels’s picture

Status: Needs work » Needs review
FileSize
9.36 KB
2.21 KB

Status: Needs review » Needs work

The last submitted patch, 7: drupal-clean_up_node_module-1751406-7.patch, failed testing.

Manuel Garcia’s picture

Parent issue: » #1574470: Selectors clean-up
rteijeiro’s picture

Status: Needs work » Needs review
FileSize
10.07 KB

Re-rolled!

Status: Needs review » Needs work

The last submitted patch, 11: drupal-clean_up_node_module-1751388-11.patch, failed testing.

rteijeiro’s picture

Status: Needs work » Needs review
FileSize
3.87 KB

Ouch! Wrong patch :(

Status: Needs review » Needs work

The last submitted patch, 13: drupal-fliter-module-up_1751388_13.patch, failed testing.

aadrian’s picture

Status: Needs work » Needs review
FileSize
3.63 KB

patch file

droplet’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/filter/filter.admin.js
    @@ -3,7 +3,7 @@
    +(function ($, Drupal, drupalSettings) {
    

    Please also check if we used Drupal & drupalSettings in this file

  2. +++ b/core/modules/filter/filter.admin.js
    @@ -21,15 +21,15 @@
    -        var $row = $context.find('#' + $checkbox.attr('id').replace(/-status$/, '-weight')).closest('tr');
    +            $row = $context.find('#' + $checkbox.attr('id').replace(/-status$/, '-weight')).closest('tr'),
    ...
    -        var $filterSettings = $context.find('#' + $checkbox.attr('id').replace(/-status$/, '-settings'));
    -        var filterSettingsTab = $filterSettings.data('verticalTab');
    +            $filterSettings = $context.find('#' + $checkbox.attr('id').replace(/-status$/, '-settings')),
    +            filterSettingsTab = $filterSettings.data('verticalTab');
    
    +++ b/core/modules/filter/filter.js
    @@ -16,18 +16,18 @@
    -        var $this = $(event.target);
    -        var value = $this.val();
    +        var $this = $(event.target),
    +            value = $this.val();
    

    we don't combine var declaration

  3. +++ b/core/modules/filter/filter.js
    @@ -16,18 +16,18 @@
    +      $('.filter-guidelines').once('filterGuidelines')
    

    missing $(context)

Manuel Garcia’s picture

Status: Needs work » Needs review
FileSize
3.54 KB

Addressing comment #17.2 and #17.3

We are calling Drupal.tableDrag and not using drupalSettings on filter.admin.js.

Manuel Garcia’s picture

FileSize
1.97 KB

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

kwoxer’s picture

Status: Needs review » Needs work

Needs a re-roll. As I'm not sure about the checked attribute I do not feel able to provide that patch on my own.

Manuel Garcia’s picture

Issue tags: +Needs reroll, +Novice

Also needs reroll for es6 https://www.drupal.org/node/2815083

mayurjadhav’s picture

Issue tags: +DrupalMumbaiCodeSprint
GrandmaGlassesRopeMan’s picture

Version: 8.4.x-dev » 8.5.x-dev
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
3.42 KB

- reroll from #18.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

kanav_7’s picture

Updated for drupal 8.6.x. Please Check.

Manuel Garcia’s picture

Thanks for the rerolls guys.
I can't think of anything else to be done here. RTBC++

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
FileSize
163 bytes

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

sahil.goyal’s picture

Rerolled the patch for the D10.1.x, as #29 is no longer compatible with D10. Attaching reroll_diff Along with patch.

nod_’s picture

  1. +++ b/core/modules/filter/filter.admin.js
    @@ -36,7 +36,7 @@
    +          if ($checkbox.prop(':checked')) {
    
    @@ -60,7 +60,7 @@
    +            $checkbox.prop(':checked')
    

    There shouldn't be a ":" in there. I do not think the code as-is work.

  2. +++ b/core/modules/filter/filter.js
    @@ -25,8 +25,8 @@
    +      $(once('filterGuidelines', '.js-filter-guidelines', context))
    

    There shouldn't be a need to change the once id here.

sahil.goyal’s picture

Addressed #42 re uploading the patch and reroll_diff

nod_’s picture

Status: Needs work » Reviewed & tested by the community

Manually tested the filter admin interface as well as the text format change behavior, both work as expected.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 43: 1751388-43.patch, failed testing. View results

nod_’s picture

Status: Needs work » Reviewed & tested by the community

second time getting this migratestub failure

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 43: 1751388-43.patch, failed testing. View results

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.