Problem/Motivation

Looking at the lines below https://git.drupalcode.org/issue/fences-3464644/-/blob/3464644-add-a-mul...

I'm wondering why we're exploding (explode()) the classes for some of the cases and not for all cases. Perhaps I'm overlooking something.
Exploding css classes by space is correct and the standard, so why aren't we doing this for all classes?

The tests that we added in #3464644: Add a multiple classes test are green, so this doesn't seem to cause issues, but maybe the classes are still not being added separately but as string containing spaces?

We need to debug this in code, I guess by kint()'ing the attributes in the twig file so we have the real result.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork fences-3464653

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

Anybody created an issue. See original summary.

anybody’s picture

Issue summary: View changes
anybody’s picture

Assigned: thomas.frobieter » grevil

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

grevil’s picture

Assigned: grevil » Unassigned
Status: Active » Needs review

Yea, that part also doesn't make much sense, as we already received the classes anyway. We basically add them again.

anybody’s picture

Assigned: Unassigned » grevil
Category: Task » Bug report
Priority: Minor » Normal
Status: Needs review » Needs work

Yeah looks totally correct, additionally I think we need to also explode in
https://git.drupalcode.org/issue/fences-3464644/-/blob/3464644-add-a-mul...

    $vars['field_items_wrapper_attributes'] = new Attribute();
    if (!empty($fences_config['fences_field_items_wrapper_classes'])) {
      $vars['field_items_wrapper_attributes']->addClass($fences_config['fences_field_items_wrapper_classes']);
    }

Then we should have them all?

grevil’s picture

Assigned: grevil » Unassigned
Status: Needs work » Needs review

All done, please review! I did it in the Web-IDE, but don't think there are any errors.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Great, tests are green and looks good to me!

  • anybody committed 722b5231 on 3.x authored by grevil
    Issue #3464653 by grevil, anybody: Do we miss explode() calls for...
anybody’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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