Problem/Motivation
Remove non essential classes from core - the classes are in classy, cores templates should be as clean as possible.
simpletest should be done with classy theme, not stark
Proposed resolution
See parent issue(s) and related issue(s) for details,
Twig Templates to modify
- core/modules/system/templates/feed-icon.html.twig
- core/modules/system/templates/field-multiple-value-form.html.twig
- core/modules/system/templates/field.html.twig
- core/modules/system/templates/fieldset.html.twig
- core/modules/system/templates/form-element-label.html.twig
- core/modules/system/templates/form-element.html.twig
- core/modules/system/templates/form.html.twig
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#54 | node_edit_after.png | 121.74 KB | narendra.rajwar27 |
#54 | node_edit_before.png | 121.74 KB | narendra.rajwar27 |
#54 | node_after.png | 54.98 KB | narendra.rajwar27 |
#54 | node_before.png | 54.98 KB | narendra.rajwar27 |
#54 | 2407727-54.patch | 4.5 KB | narendra.rajwar27 |
Comments
Comment #1
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedComment #2
davidhernandezPostponing this until we decide how we are moving forward. Keep an eye on #2348543: [meta] Consensus Banana Phase 2, transition templates to the starterkit theme for updates. Thanks.
Comment #3
davidhernandezUn-postponing. The templates have been copied to Classy, so all we need to do is remove classes from the original templates.
Comment #4
davidhernandezI left a few classes. I'm not sure where we stand on things like form-required.
Comment #6
mortendk CreditAttribution: mortendk commentedlook through the css & js found a js- prefix for
.form-disabled
Comment #10
mortendk CreditAttribution: mortendk commentedComment #12
mortendk CreditAttribution: mortendk commentedlooks like its testing on core and not classy ?
Comment #13
mortendk CreditAttribution: mortendk commentedfixed test ensured they used classy to test on
Comment #14
rteijeiro CreditAttribution: rteijeiro commentedGood job, @mortendk! Keep rocking!! \m/
Form elements BEFORE
Form elements AFTER
Comment #15
alexpottSomething is feeling really wrong about prefixing everything that javascript touches with js- especially when the class is being used to give the element style.
Comment #16
mortendk CreditAttribution: mortendk commentedComment #17
mortendk CreditAttribution: mortendk commentedComment #18
mortendk CreditAttribution: mortendk commentedWe need this sepration for the css to not accedentially removing / overwriting somebody thats needed / provided from the js.
This means that we need to refactor the js stuff & also clean up the css to follow our codestandards
Comment #19
mortendk CreditAttribution: mortendk commentedafter looking at the templates, js & forms we need to seperate that out to a single issue that cleans up the js dependencies in the forms, but we should do that in one patch, else its gonna be a logistical nightmare to make it work. Theres simply to many places that we need to clean up.
This patch removes the classes we can remove from core, without going down the rabbit hole of js dependency with forms
@todo create an issue with js prefix / data- attribute selectors for js functionality in core.
#2408473: Rewrite form.css inline with our CSS standards
Comment #20
rteijeiro CreditAttribution: rteijeiro commentedPatch applies and works. No visual regressions. Back to RTBC then...
Comment #21
mortendk CreditAttribution: mortendk commentedComment #22
mortendk CreditAttribution: mortendk commentedComment #23
mortendk CreditAttribution: mortendk commentedComment #24
mortendk CreditAttribution: mortendk commented2 classes got deleted from core, that well take care at over in #2431671: [meta] Add in js- prefixed classes for separation of JS & CSS functionality
Comment #25
mortendk CreditAttribution: mortendk commentedComment #28
mortendk CreditAttribution: mortendk commentedComment #29
rteijeiro CreditAttribution: rteijeiro commentedLooks good! Great job!
Node Teaser BEFORE
Node Teaser AFTER
Node BEFORE
Node AFTER
Node Edit Form BEFORE
Node Edit Form AFTER
Comment #30
alexpottWe're removing lots of classes that people have become very accustomed to in this issue - all of these issues should share a single CR that list all of the classes removed and any added for js implementations.
Comment #31
mortendk CreditAttribution: mortendk commented@alex should we combine that with the cr for the form cleanup ? [#2452043]
Comment #32
mortendk CreditAttribution: mortendk commented@alex should we combine that with the cr for the form cleanup ? [#2452043]
Comment #33
mortendk CreditAttribution: mortendk commentedchangerecord added [#2452297]
setting back to rtbc ?
Comment #34
webchickBack to Alex for feedback. Although...
This trend worries me a bit. It's adding noise to that test which has absolutely nothing to do with classy theme. And from the looks of it, this pattern is introduced in other tests as well.
What's the rationale for this? Did one of the other core committers recommend this approach?
Comment #35
alexpottHow does the view-ui look in stark before and after this patch?
Comment #36
alexpottAlso re #34 this means that the test has some assertions for classes removed by this patch. Which hints that these things need to be manually tested in stark to make sure they still work and are usable.
Putting back to needs work to ensure that (a) it is really necessary to have the tests depend on classy (b) that the necessary manual testing has been carried out and evidence posted to this issue.
[EDIT: to make sense]
Comment #37
mortendk CreditAttribution: mortendk commented@webchick the rationale is when a test is not using classy but goes to stark for the test.
Comment #38
davidhernandezIt looks like all the js- prefix needing for this one has been done and it is free to work on.
Comment #39
RainbowArrayThe last patch was very, very old. So I tried to manually reapply the changes. It looked a few more classes had been made safe to remove, so I did my best guesses with some grepping. Some JS and tests might still need to be updated that have both js-form-required and form-required as part of the efforts to make the js version of the class. So there will probably be initial errors that can help find those problems.
This should be looked at carefully in case some of the classes are still needed.
Comment #40
gints.erglis CreditAttribution: gints.erglis commentedPatch applies and works. No visual regressions.
Comment #41
davidhernandezThis is missing the removal from feed-icon.
Comment #48
apadernoComment #49
apadernoComment #50
alexpottLooks like I gave feedback in 2015 :)
Comment #51
tim.plunkettFixing tag
Comment #53
narendra.rajwar27Comment #54
narendra.rajwar27Re-created patch from comment #39, considered comment #41. Patch is getting applied for 8.8.x upto 9.1.x.
Here adding before/after screenshot for the patch is not going to work, because patch has changes related to system module templates. But by default seven and bartik is picking classy theme templates instead of system module templates which are in patch file. Though i am adding screenshot as tagged for Screenshot.
Node Before
Node After
Node edit before
Node edit after
Comment #56
narendra.rajwar27Comment #63
quietone CreditAttribution: quietone at PreviousNext commented