Problem/Motivation

We expose many class attributes in templates and other layers (for example preprocess), but it's never clear which classes are needed for JavaScript functionality, leaving themers in the dark if they want to slim down their markup and not break JS.

This is also being fixed in Drupal Core in #2431671: [meta] Add in js- prefixed classes for separation of JS & CSS functionality

Proposed resolution

Implement js- prefix for autocomplete to separate JavaScript behavior from styling as outlined in #2431671: [meta] Add in js- prefixed classes for separation of JS & CSS functionality

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Linkit autocomplete textfields now implement a js-form-linkit-autocomplete class for to separate JavaScript behavior from styling.

Issue fork linkit-3088314

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
StatusFileSize
new3.35 KB

Attached patch implements a js-form-linkit-autocomplete class for to separate JavaScript behavior from styling. As a result, we can reuse the autocomplete styling available in Drupal Core in combination with the patch in #3088296: Implement js- prefix for autocomplete textfields to separate JavaScript behavior from styling. This becomes more visible when using Claro as the admin theme.

idebr’s picture

StatusFileSize
new3.38 KB
idebr’s picture

Version: 8.x-5.x-dev » 6.0.x-dev
StatusFileSize
new3.42 KB

Reroll against latest 6.0.x after #3288339: Drupal 10 compatibility was committed.

mark_fullmer’s picture

Version: 6.0.x-dev » 7.x-dev

kevzijl made their first commit to this issue’s fork.

nils.destoop’s picture

Status: Needs review » Needs work

Patch is not apply-ing anymore, and also breaks the linkit styling when using the ckeditor link widget.

chewi3’s picture

StatusFileSize
new2.73 KB

Rerolled the last patch for 7.0.7.

idebr’s picture

Status: Needs work » Closed (duplicate)

The autocomplete icon in the CKEditor widget cannot be updated with this approach without duplicating css, so the approach in #3472411: Match autocomplete icon to Claro autocomplete is preferable