Convert jQuery to vanilla Javascript

Created on 3 January 2024, 12 months ago
Updated 29 March 2024, 9 months ago

Problem/Motivation

In πŸ“Œ Create an administration UI for managing Navigation Sections Needs work we added the ability for the user to manage the navigation sections/components/blocks. That implemenation was a copy of the core blocks implementation, with some tweaks made where necessary. Part of that copy was some Javascript that helps with the front end management of the Navigation admin UI. That copy brought with it use of jQuery, which the block system still makes use of. Note that the copy of the block admin Javascript came from the 10.2.x branch of core. Ideally, we would avoid introducing new Javascript that relies on jQuery.

Proposed resolution

Conver the Javascript that was added in πŸ“Œ Create an administration UI for managing Navigation Sections Needs work , that uses jQuery, to use vanilla Javascript and drop the jQuery dependencies.

NOTE: As this Javascript came as a copy of the block system Javascript from Drupal core, the work done here, would be very applicable to the core goal of reducing jQuery. Consider contributing the work done here back upstream to Drupal core 🌱 [meta] Replace JQuery with vanilla Javascript in core Active .

Remaining tasks

Code refactoring.

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada m4olivei Grimsby, ON

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024