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.
Issue #2473941 by mortendk, rteijeiro, rachel_norfolk, Cottser, LewisNyman: Prefix field-parent classes with js-
Task
Prefix field-parent classes with js- to separate classes needed for JavaScript functionality from those used for styling and make it clear which classes can safely be removed without breaking JavaScript functionality.
Remaining tasks
- Patch
- Patch review
- Manual testing
Steps to test
@todo
Beta phase evaluation
Issue category | Task |
---|---|
Issue priority | Normal |
Unfrozen changes | Unfrozen because it mostly just affects templates and JS which are not frozen. |
Prioritized changes | The main goal of this issue is to improve themer experience and arguably it reduces fragility where JavaScript and markup intersect. |
Disruption | Shouldn't be too disruptive as it is mostly affecting CSS classes that are added to markup. Themes extending Classy will only have classes added. Themes not extending Classy will have classes removed but they can be added back via template overrides. |
User interface changes
None for themes extending Classy. Possible visual changes for other themes.
API changes
n/a
Comment | File | Size | Author |
---|---|---|---|
#1 | interdiff-2473941-field-parent.txt | 596 bytes | star-szr |
#1 | 2473941-field-parent-additional.patch | 1.83 KB | star-szr |
#1 | 2473941-field-parent-split.patch | 1.25 KB | star-szr |
Comments
Comment #1
star-szrInitial patch split from the parent, some additional changes from grepping, and interdiff between the two.
Comment #2
star-szrComment #3
LewisNymanI manually tested this patch and the field ui works as it did before. I also had a quick grep for any remaining
field-parent
in Javascript and there was none.Comment #5
star-szrRandom fail:
Drupal\simpletest\Tests\SimpleTestBrowserTest - "0 fails, 0 exceptions" found
Comment #6
catchIf this class is used for js, why is no js updated in the patch?
Comment #7
star-szrThe -additional is the one to review, it just succumbed to a random test fail :/
Comment #8
star-szrAdding suggested commit message.
Comment #9
LewisNymanComment #10
alexpottCommitted 07bcb91 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation.