Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
javascript
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Apr 2015 at 22:50 UTC
Updated:
18 Aug 2015 at 11:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
star-szrPatch split from parent issue. I wasn't able to find anything additional by grepping.
Comment #2
lewisnymanI manually tested this patch, and I can't really figure out how this is used in Javascript. I can see the
js-form-requiredclass added but all Javascript seems to do is add/remove theform-requiredclass for styling. It doesn't seem to use it for functionality.Can @nod_ confirm?
Comment #3
star-szrAdding suggested commit message.
Comment #4
lewisnymanSave us nod!
Comment #5
nod_@lewis: indeed. I can't see form-required used for JS functionality.
The
form-requiredis hardcoded in the states.js file though, that's ok with you? I see it's removed from the default datetime wrapper thing, just asking.Comment #6
lewisnymanOk, thanks for clarifying that. I'm ok with this patch, we can always improve this separation down the road, this is not a good time to get our hands dirty in states.js :)
Comment #7
star-szrSmall docs touch up.
Comment #9
star-szrTwo interdiffs :(
Comment #12
star-szrLooked like an unrelated/random fail.
Comment #13
mortendk commentedworks as expected also in stark
and yes we can fix & pretty up more further down the road.
Comment #15
star-szrA test got added in #980144: Issues with "required, multiple" fields in forms using assertRaw for exact markup. Refactoring to use XPath. The attached test-only patch reverts the bug fix part from #980144: Issues with "required, multiple" fields in forms to prove that the revised test still catches the bug fixed there.
Comment #16
star-szrOkay so the test-only patch has to not use
js-form-required, it's late :) still fails, should be only 1 fail like on #980144-47: Issues with "required, multiple" fields in forms.Comment #19
star-szrAlright so the test only patches did what they were supposed to. Back to needs review.
Comment #20
cilefen commentedreroll
Comment #21
star-szrTagging for reroll.
Comment #22
cilefen commentedrerolled
Comment #23
davidhernandezThis needed rerolling.
Comment #24
lewisnymanThanks. I manually tested this patch and the JS still kicks in.
Comment #25
alexpottThis seems inconsistent - we're adding both classes in the form API but we're not in the default templates - how come?
Comment #26
star-szrBecause we can only make the differentiation between Classy and default when we're in the theme layer (for practical purposes this means preprocess and templates).
The parent issue shows the plan for Classy vs. core templates.
Edit: also we've been getting patches committed that treat Classy markup differently than markup in this meta…
#2473949: Prefix form-type-* classes with js-
#2473957: Prefix text-* classes with js-
Comment #27
alexpott@Cottser yes but those issue completely removed the class they were changing from core - this issue (and the other) has not managed to do that. Therefore the current patch leaves core very inconsistent wrt to whether the form-required class is there.
Comment #28
star-szr@alexpott thanks! I thnk form-type-* completely removed it but text-* didn't, look at the field plugins.
As I said on #2473945: Prefix form-item classes with js- happy to change course to get this wrapped up :)
Comment #29
lewisnymanNeeds work based on the consensus in #2431671: [meta] Add in js- prefixed classes for separation of JS & CSS functionality
Comment #30
yannickooI have added the
form-requiredclass back to 3 twig templates :)Comment #31
lewisnymanSimple! Thanks.
Comment #32
alexpottCommitted 01e703d and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.