Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
addClass could be used with just one .addClass
ex:
<div{{ attributes.addClass(classes,'field__items') }}>
Because the field template is used so often, this could be a performance hit (two calls to addClass() vs. one).
Beta phase evaluation
Issue category | Task because it's a performance increase and nothing is broken. |
---|---|
Issue priority | Normal, nothing is broken. |
Prioritized changes | The main goal of this issue is performance. |
Disruption | No disruption at all. |
Proposed resolution
FIx it.
Remaining tasks
None
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Comment | File | Size | Author |
---|---|---|---|
#2 | field-cleanup-addclass2.diff | 984 bytes | mortendk |
field-cleanup-addclass.diff | 982 bytes | mortendk | |
Comments
Comment #2
mortendk CreditAttribution: mortendk as a volunteer commentedand fixed the spacing
Comment #3
star-szrThanks, added beta eval and updated IS. Good to go!
Comment #4
davidhernandez+1
Comment #5
alexpottCommitted f8fbcbe and pushed to 8.0.x. Thanks!