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 #2473943 by mortendk, rteijeiro, mu5a5hi, Manjit.Singh, rachel_norfolk, Cottser, LewisNyman: Prefix form-file and form-managed-file classes with js-
Task
Prefix form-file and form-managed-file 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
- Navigate to
/node/add/article
- Upload an image
- Remove the image
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 |
---|---|---|---|
#47 | prefix_form_file_and-2473943-47.patch | 8.79 KB | Manjit.Singh |
#43 | interdiff-2473943-24-41.txt | 612 bytes | Manjit.Singh |
#41 | prefix_form_file_and-2473943-41.patch | 8.96 KB | Manjit.Singh |
#24 | prefix_form_file_and-2473943-24.patch | 8.95 KB | Manjit.Singh |
#13 | prefix_form_file_and-2473943-13.patch | 8.91 KB | mu5a5hi |
Comments
Comment #1
star-szrInitial patch split from the parent, some additional changes from grepping, and interdiff between the two.
Comment #3
star-szrRerolled for #2407565: Consensus Banana Phase 1, cleanup, interdiff shows the template changes that have been moved from preprocess.
Comment #4
LewisNymanI manually tested the patch and it works. I also grepped for more changes and couldn't find any.
Should we remove the non-functional class from the test?
Comment #5
star-szrAll tests are currently using Classy so it makes sense (and is necessary) to keep both classes in the tests at least until #2352949: Deprecate using Classy as the default theme for the 'testing' profile.
Comment #6
LewisNymanOk sounds good to me, just checking
Comment #7
catchIf classy sets the form-managed-file class now.
Then why also set it here?
And here?
Comment #8
star-szr@catch because those are different bits of markup coming from three different theme hooks :/
Comment #9
star-szrAdding suggested commit message.
Comment #10
LewisNymanNice
Comment #12
mu5a5hi CreditAttribution: mu5a5hi as a volunteer commentedAt Drupalcon LA. Going to try to re-roll the patch.
Comment #13
mu5a5hi CreditAttribution: mu5a5hi as a volunteer commentedAutomerged, Worked with no conflicts.
Comment #14
mu5a5hi CreditAttribution: mu5a5hi as a volunteer commentedComment #15
LewisNymanThanks, the two patches are identical.
Comment #16
star-szrAdding @mu5a5hi to the suggested commit message, thanks for sprinting with us at DCLA!
Comment #17
alexpottThis needs a reroll...
Comment #18
star-szrTagging as novice for the reroll.
Comment #19
Manjit.Singh@alexpott @cottser I am applying #13 patch locally and it is working fine ;)
Getting No issues while apply !! Please correct if i am wrong ?
Comment #20
star-szr@Manjit.Singh make sure to pull, the conflict here is related to another patch that was committed a few hours ago or so.
Comment #21
Manjit.Singh@cottser yup forget to pull , Here is a rerolled patch :)
Comment #22
star-szr@Manjit.Singh thanks! I think we should add the form-managed-file back to core's file-managed-file.html.twig because core/modules/file/css/file.admin.css has several usages.
So another novice task would be to create a new patch and interdiff with that change!
See #2473955-9: Prefix form-wrapper classes with js- for the relevant discussion.
Comment #23
star-szrAdding @Manjit.Singh to the suggested commit message.
Comment #24
Manjit.Singhadding class as per suggestion in #22
Comment #25
Manjit.Singhadding a interdiff for #21 and #24
Comment #26
Manjit.SinghComment #27
star-szr@Manjit.Singh to answer your question in IRC, rerolls don't need interdiffs :)
Edit: and thanks! I don't think I should re-RTBC this since I worked on it but it looks good to me.
Comment #28
Manjit.SinghComment #29
cilefen CreditAttribution: cilefen commented@Manjit.Singh For the same reasons as Cottser, perhaps someone else should peer review this.
Also, I hate to be a nudge but if you mark an issue RTBC it will help the community and the committers if you explain how you came to that conclusion.
Comment #30
mortendk CreditAttribution: mortendk as a volunteer commentedtested both in seven & stark it works as it should :)
Comment #32
mortendk CreditAttribution: mortendk as a volunteer commentedhuh ??
Comment #33
star-szrSeems flukey, one fail in Drupal\Tests\simpletest\Functional\BrowserTestBaseTest. I'll hit re-test.
Comment #35
LewisNymanSeems legit
Comment #38
davidhernandezWas RTBC before. Not sure if we are getting random testbot fails here.
Comment #39
star-szrFor the record the last one was a failed to do run-tests.sh type error. Didn't see the detailed results.
Comment #40
alexpottLooks like a reroll has gone awry...
Should be .js-form-submit
Comment #41
Manjit.Singhreplacing
.form-submit
with.js-form-submit
Comment #42
Manjit.SinghComment #43
Manjit.Singhuploading interdiff
Comment #44
yogen.prasad CreditAttribution: yogen.prasad commentedWorking Fine
Comment #46
lauriiiComment #47
Manjit.Singhrerolling a patch
Comment #48
Manjit.SinghComment #49
LewisNymanGreat, the patch looks correct.
Comment #50
alexpottThanks adding the beta evaluation to the issue summary. Committed 96aaa70 and pushed to 8.0.x. Thanks!