Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
javascript
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Apr 2015 at 22:46 UTC
Updated:
23 Sep 2015 at 15:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
star-szrInitial patch split from the parent, some additional changes from grepping, and interdiff between the two.
Comment #3
lewisnymanI manually tested the patch and it works. I also grepped and couldn't find any other changes.
I think here we could also just test for the functional class as well?
Comment #4
star-szrYeah IMO that XPath shouldn't care that much about the classes. Updating that in a separate issue would make 2-3 of these patches smaller.
Comment #5
star-szrHere's that issue: #2474107: Make OptionsWidgetsTest::testEmptyValue() care less about markup
Comment #6
star-szrReuploading the initially split patch after #2474107: Make OptionsWidgetsTest::testEmptyValue() care less about markup was committed.
Also these issues all need commit credits I'm realizing!
Comment #7
star-szrAdding suggested commit message.
Comment #8
lewisnymanOk in that case we can fix the test in a followup. I knight this issue RTBC.
Comment #10
emma.mariaI rerolled the patch.
Comment #11
star-szr@LewisNyman already fixed :D #2474107: Make OptionsWidgetsTest::testEmptyValue() care less about markup
Comment #12
lewisnymanGreat! Thanks.
Comment #13
star-szrChanging to bug report because non-Classy text-format-wrapper.html.twig is currently missing a class that is used in JS. Tweaked beta evaluation accordingly.
Comment #15
star-szrAnother reroll, just a small conflict in core's form-element.html.twig.
Comment #16
star-szrRerolling because #2473953: Prefix form-submit classes with js- got in :)
Comment #17
star-szrTagging for reroll.
Comment #18
cilefen commentedrerolled
Comment #19
davidhernandezJust making a note that this one still applies cleanly.
Comment #20
lewisnymanNice work everyone. This is identical to the pervious patch I RTBC'd
Comment #21
alexpotthuh?
Here we add...
Here we are taking away. I think all the changes from form-item => js-form-item should instead by additions to be consistent with the rest of the patch.
Comment #22
alexpottComment #23
star-szrI think my comment on #2473951-26: Prefix form-required classes with js- applies here as well, but I'd be fine with changing gears and doing additions only in the interests of getting this and similar issues in :)
And more specifically this is the only really problematic part I can see because we shouldn't be removing classes from Classy at this point.
Comment #24
axe312 commentedi am working on this
Comment #25
axe312 commentedI added the missing form-item classes and removed the change to the text-format-wrapper which might be added accidentally in the last patch.
Also the patch is now applying to most current dev.
Comment #27
lewisnymanComment #28
yannickooComment #29
lewisnymanOk great. Thanks for working on this.
Comment #30
alexpottThis is about
form-itemwe shouldn't be removingtext-format-wrapperhere.Comment #31
yannickooI have added the
text-format-wrapperback but I'm kinda confused why there that class is missing incore/modules/filter/templates/text-format-wrapper.html.twig.Comment #32
davidhernandez@yannickoo, thetext-format-wrapper class isn't needed in the core version of the template. It is in the Classy version.
I don't understand why these form-item classes are being added here. All the patches in this issue have this. Am I missing something?
Comment #33
alexpott@davidhernandez I think this javascript was broken by a previous over-zealous removal of classes. This one #2349677: Copy filter templates to Classy
Comment #34
rachel_norfolkI'm kinda hoping I've got this re-roll correct...
Comment #35
rachel_norfolkI have looked into the comments at #34 and can't find any need for the form-item and js-form-item classes to appear on the wrappers, as @davidhernandez mentions. The actual form items within that group contain the classes, anyway.
I wasn't able to work out the issue at #33 and maybe I'm just not seeing a problem in my own manual testing?
Comment #36
star-szrThanks @rachel_norfolk :)
Based on #33 it sounds like this should stay and a js-form-item be added, and these classes also be added to the core template. I don't know how to manually test that JS though.
Comment #37
lewisnymanSounds like this needs work to add these classes back in.
Comment #38
davidhernandezAdded the classes back.
Comment #39
akalata commentedCurrently doing some in-depth manual testing.
Comment #40
akalata commentedI've manually tested the changes in the following files:
Javacript
core/misc/machine-name.js via admin/structure/types/manage/article/fields/add-field
core/modules/filter/filter.filter_html.admin.js via node/add/page
core/modules/locale/locale.admin.js via admin/config/regional/translate
Modules/System/other default using Stark as admin theme
core/modules/filter/templates/text-format-wrapper.html.twig via node/add/page
core/modules/system/form-element.html.twig via admin/structure/types/manage/article/fields/add-field
Classy as admin theme
core/themes/classy/templates/content-edit/text-format-wrapper.html.twig via node/add/page
core/themes/classy/templates/form/form-element.html.twig via admin/structure/types/manage/article/fields/add-field
I was able to partially test the following:
core/misc/states.js I tested the
:visible, but could not find a usage of:requiredor:disabledas actual state changes -- I'm thinking this is what @cottser meant in #36?core/modules/system/fieldset.html.twig and core/themes/classy/templates/form/fieldset.html.twig The html changes were good (tested at search/node), but I could not find a collapsing fieldset in order to test related javascript (that I'm assuming exists).
core/modules/system/templates/field-multiple-value-form.html.twig
and core/themes/classy/templates/form/field-multiple.value-form.html.twig The html changes were good (tested by adding a multi-value text field), but I'm not sure that any javascript was updated so that it actually is looking for this class. (I removed .form-item and it worked, so maybe it's not using either class?)
I also tested the html in about half the files listed below, but I have to ask does it really make sense to add the js- to these markup wrappers? I know they're being added everywhere else for consistency via
form-element.html.twig; if people think they should stay I can finish up that testing for good measure.Comment #41
jaxxed commentedShould we also look at this from the other side: what JS calls are looking for .form-item, when they could/should be looking for .js-form-item?
Comment #42
davidhernandez@jaxxed, yes, the patch should update any JS that is looking for the class. It looks like in your txt file you are finding classes that being with form-item-*. There is a separate issue for that. #2473947: Prefix form-item-* classes with js-
This issue is just for the exact "form-item" classes.
Comment #43
lewisnyman@jaxxed Yep, the javascript should be calling
.js-form-iteminstead of.form-item. It looks like your grep only turned up classes that start withform-item-*. Those are being covered in #2473947: Prefix form-item-* classes with js-. Maybe that is a good one to review next.Setting this to RTBC.
Comment #44
alexpottCommitted 44e0f2f and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.