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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sivaji_Ganesh_Jojodae’s picture

Status: Active » Needs review
FileSize
14 KB
davidhernandez’s picture

Status: Needs review » Postponed

Postponing 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.

davidhernandez’s picture

Title: Copy system templates f*.html.twig to Classy » Remove classes from system templates f*.html.twig
Issue summary: View changes
Status: Postponed » Needs work

Un-postponing. The templates have been copied to Classy, so all we need to do is remove classes from the original templates.

davidhernandez’s picture

Status: Needs work » Needs review
FileSize
5.06 KB

I left a few classes. I'm not sure where we stand on things like form-required.

Status: Needs review » Needs work

The last submitted patch, 4: remove_classes_from-2407727-4.patch, failed testing.

mortendk’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
8.25 KB

look through the css & js found a js- prefix for .form-disabled

Status: Needs review » Needs work

The last submitted patch, 6: cleanup-templates-f.diff, failed testing.

Status: Needs work » Needs review

mortendk queued 6: cleanup-templates-f.diff for re-testing.

Status: Needs review » Needs work

The last submitted patch, 6: cleanup-templates-f.diff, failed testing.

mortendk’s picture

Status: Needs work » Needs review
FileSize
7.71 KB

Status: Needs review » Needs work

The last submitted patch, 10: cleanup-templates-f-2.diff, failed testing.

mortendk’s picture

looks like its testing on core and not classy ?

mortendk’s picture

Status: Needs work » Needs review
FileSize
10.14 KB

fixed test ensured they used classy to test on

rteijeiro’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
466.57 KB
466.98 KB

Good job, @mortendk! Keep rocking!! \m/

Form elements BEFORE

Form elements AFTER

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

Something is feeling really wrong about prefixing everything that javascript touches with js- especially when the class is being used to give the element style.

mortendk’s picture

Issue tags: +jsbanana
mortendk’s picture

Status: Needs review » Needs work
mortendk’s picture

Something is feeling really wrong about prefixing everything that javascript touches with js- especially when the class is being used to give the element style.

We 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

mortendk’s picture

Status: Needs work » Needs review
FileSize
1.92 KB
8.35 KB

after 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

rteijeiro’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies and works. No visual regressions. Back to RTBC then...

mortendk’s picture

Issue summary: View changes
mortendk’s picture

mortendk’s picture

FileSize
8.4 KB
1.95 KB
mortendk’s picture

Status: Reviewed & tested by the community » Needs review

2 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

mortendk’s picture

Issue tags: +dclondon

mortendk queued 23: f-templates-5.diff for re-testing.

Status: Needs review » Needs work

The last submitted patch, 23: f-templates-5.diff, failed testing.

mortendk’s picture

Status: Needs work » Needs review
FileSize
7.14 KB
rteijeiro’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
505.68 KB
506.62 KB
773.3 KB
773.25 KB
371.62 KB
371.62 KB

Looks good! Great job!

Node Teaser BEFORE

Node Teaser AFTER

Node BEFORE

Node AFTER

Node Edit Form BEFORE

Node Edit Form AFTER

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record

We'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.

mortendk’s picture

@alex should we combine that with the cr for the form cleanup ? [#2452043]

mortendk’s picture

@alex should we combine that with the cr for the form cleanup ? [#2452043]

mortendk’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs change record

changerecord added [#2452297]
setting back to rtbc ?

webchick’s picture

Assigned: Unassigned » alexpott

Back to Alex for feedback. Although...

+++ b/core/modules/field/src/Tests/EntityReference/EntityReferenceFormatterTest.php
@@ -177,6 +177,10 @@ public function testEntityFormatter() {
+    // Enable the Classy theme.
+    \Drupal::service('theme_handler')->install(['classy']);
+    $this->config('system.theme')->set('default', 'classy')->save();

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?

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

How does the view-ui look in stark before and after this patch?

alexpott’s picture

Status: Needs review » Needs work

Also 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]

mortendk’s picture

Issue tags: -dclondon +need screenshots, +needs manual test

@webchick the rationale is when a test is not using classy but goes to stark for the test.

davidhernandez’s picture

It looks like all the js- prefix needing for this one has been done and it is free to work on.

RainbowArray’s picture

Status: Needs work » Needs review
FileSize
3.87 KB

The 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.

gints.erglis’s picture

Patch applies and works. No visual regressions.

davidhernandez’s picture

Status: Needs review » Needs work

This is missing the removal from feed-icon.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

apaderno’s picture

Version: 8.6.x-dev » 8.9.x-dev
Issue tags: -frontend, -banana, -cssbanana, -jsbanana, -need screenshots, -needs manual test +Need screenshot, +Needs manual testing
apaderno’s picture

Issue tags: -Need screenshot +Needs screenshot
alexpott’s picture

Assigned: alexpott » Unassigned

Looks like I gave feedback in 2015 :)

tim.plunkett’s picture

Issue tags: -Needs screenshot +Needs screenshots

Fixing tag

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

narendra.rajwar27’s picture

Assigned: Unassigned » narendra.rajwar27
narendra.rajwar27’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
4.5 KB
54.98 KB
54.98 KB
121.74 KB
121.74 KB

Re-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

Status: Needs review » Needs work

The last submitted patch, 54: 2407727-54.patch, failed testing. View results

narendra.rajwar27’s picture

Assigned: narendra.rajwar27 » Unassigned

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Issue tags: +Needs change record