Refactor (if feasible) uses of the jQuery class function to use Vanilla/native

Created on 24 September 2021, about 3 years ago
Updated 31 August 2024, 3 months ago

Problem/Motivation

As mentioned in the parent issue #3238306: [META] Where possible, refactor existing jQuery uses to vanillaJS to reduce jQuery footprint , we are working towards reducing our jQuery footprint. One of the ways to accomplish this is to reduce the number of jQuery features used in Drupal core. We have added eslint rules that identify specific features and fail tests when those features are in use.

There are (or will be) individual issues for each jQuery-use eslint rule. This one is specific to "jquery/no-class", which targets the jQuery class function.

Steps to reproduce

Proposed resolution

Remaining tasks

  • If it's determined to be feasible, refactor those uses of jQuery .class() to use Vanilla (native) JavaScript instead.

There are unresolved comments in the MR

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Javascript 

Last updated 2 days ago

Created by

🇺🇸United States Theresa.Grannum Boston

Live updates comments and jobs are added and updated live.
  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • First commit to issue fork.
  • 🇮🇳India omkar-pd

    Not sure why the Compilation check is failing at yarn run -s check:ckeditor5 Can't see any error just ERROR: Job failed: command terminated with exit code 1

  • 🇫🇷France nod_ Lille

    this does not seem like it would work. calling classlist on a jquery collection won't do much.

  • 🇫🇷France nod_ Lille

    The MR is just a search/replace and no code has been run apparently, closing the MR to avoid confusion, it needs to be reworked from scratch.

    Please create a new branch from 11.x and start a new MR

  • Merge request !5995Refactor uses of the jQuery class function → (Open) created by omkar-pd
  • Pipeline finished with Failed
    11 months ago
    #73573
  • Pipeline finished with Failed
    11 months ago
    #73954
  • Pipeline finished with Success
    11 months ago
    #73963
  • Pipeline finished with Failed
    11 months ago
    #74021
  • Pipeline finished with Failed
    11 months ago
    #74050
  • Pipeline finished with Success
    11 months ago
    #74067
  • Pipeline finished with Failed
    11 months ago
    #74274
  • Pipeline finished with Success
    11 months ago
    #74286
  • Pipeline finished with Failed
    10 months ago
    #77301
  • Pipeline finished with Canceled
    10 months ago
    #77320
  • Pipeline finished with Failed
    10 months ago
    #77324
  • Pipeline finished with Failed
    10 months ago
    #77437
  • Pipeline finished with Success
    10 months ago
    #77501
  • Pipeline finished with Failed
    10 months ago
    #77894
  • Pipeline finished with Failed
    10 months ago
    #77929
  • Pipeline finished with Success
    10 months ago
    #77985
  • Pipeline finished with Success
    10 months ago
    #78055
  • Pipeline finished with Failed
    10 months ago
    #80718
  • Pipeline finished with Canceled
    10 months ago
    #80735
  • Pipeline finished with Success
    10 months ago
    #80736
  • Pipeline finished with Pending
    10 months ago
    #81442
  • Pipeline finished with Success
    10 months ago
    #81457
  • Pipeline finished with Failed
    10 months ago
    Total: 561s
    #84824
  • Pipeline finished with Success
    10 months ago
    Total: 619s
    #86731
  • Pipeline finished with Failed
    9 months ago
    Total: 171s
    #93942
  • Pipeline finished with Failed
    9 months ago
    Total: 488s
    #93947
  • Pipeline finished with Success
    9 months ago
    #93995
  • Status changed to Needs review 9 months ago
  • 🇮🇳India omkar-pd

    Refactored the class function. Please review.

  • Pipeline finished with Success
    9 months ago
    Total: 569s
    #111777
  • 🇺🇸United States smustgrave

    Personally I'm not in favor of using [0] for the selector as I think it makes the readability go down. But will refer to the sub-maintainers for that.

  • Status changed to Needs work 8 months ago
  • The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

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

  • Status changed to Needs review 8 months ago
  • 🇫🇷France nod_ Lille
  • Status changed to Needs work 8 months ago
  • The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

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

  • Status changed to Needs review 8 months ago
  • Status changed to Needs work 8 months ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

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

  • Status changed to Needs review 8 months ago
  • Status changed to Needs work 8 months ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

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

  • 🇫🇷France nod_ Lille

    Please fix the merge conflicts before setting back to needs review, thanks

  • Pipeline finished with Failed
    8 months ago
    Total: 177s
    #137038
  • Pipeline finished with Success
    8 months ago
    Total: 755s
    #137059
  • Status changed to Needs review 8 months ago
  • 🇮🇳India omkar-pd

    Solved conflicts.

  • Status changed to Needs work 7 months ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

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

  • Status changed to Needs review 7 months ago
  • Status changed to Needs work 7 months ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

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

  • Pipeline finished with Canceled
    7 months ago
    Total: 502s
    #150253
  • Pipeline finished with Failed
    7 months ago
    Total: 991s
    #150261
  • First commit to issue fork.
  • Pipeline finished with Failed
    5 months ago
    Total: 168s
    #196116
  • Pipeline finished with Failed
    5 months ago
    Total: 552s
    #196121
  • Pipeline finished with Failed
    5 months ago
    Total: 870s
    #196141
  • Pipeline finished with Failed
    5 months ago
    Total: 170s
    #196168
  • Pipeline finished with Failed
    5 months ago
    Total: 182s
    #196172
  • Pipeline finished with Success
    5 months ago
    Total: 539s
    #196176
  • Pipeline finished with Success
    5 months ago
    Total: 577s
    #196208
  • Status changed to Needs review 5 months ago
  • Status changed to Needs work 5 months ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

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

  • 🇳🇿New Zealand quietone

    I answered the query in the MR and there are unresolved comments there.

Production build 0.71.5 2024