Problem/Motivation

In #3123832: [META] Fix @todo items referencing closed issues we discovered that there's a @todo in claro_preprocess_filter_guidelines which references a d.o. issue that is already closed: #2881212: Formatting guidelines toggle script relies on Classy selectors

Here's the @todo:

function claro_preprocess_filter_guidelines(&$variables) {
  // Fix filter guidelines selector issue of 'filter/drupal.filter'.
  // @todo Remove when https://www.drupal.org/node/2881212 is fixed.
  $variables['attributes']['class'][] = 'filter-guidelines-item';
  $variables['attributes']['class'][] = 'filter-guidelines-' . $variables['format']->id();
}

Steps to reproduce

Proposed resolution

In #2881212: Formatting guidelines toggle script relies on Classy selectors we removed the CSS styling for filter-guidelines-*-classes.
Setting those classes in claro_preprocess_filter_guidelines is not having any effect in core anymore, so let's remove claro_preprocess_filter_guidelines completely.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3374031

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

Spokje created an issue. See original summary.

spokje’s picture

Issue summary: View changes
spokje’s picture

spokje’s picture

Issue summary: View changes
Status: Active » Needs review
keshavv’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed the MR and also checked it locally.
The class is already defined in filter-guidelines.html.twig

{%
  set classes = [
    'filter-guidelines__item',
    'filter-guidelines__item--' ~ format.id|clean_class,
  ]
%}

Confirmed that we can go with this MR.
Thank you.

lauriii’s picture

Status: Reviewed & tested by the community » Fixed

That looks like a different class that is being added in filter-guidelines.html.twig 🤔 Either way, I confirmed that this is no longer used by anything and that the filter descriptions are toggled as expected.

Committed c91fe0f and pushed to 11.x. Thanks!

  • lauriii committed c91fe0fa on 11.x
    Issue #3374031 by Spokje: Remove claro_preprocess_filter_guidelines
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.