Problem/Motivation

In #2348543: [meta] Consensus Banana Phase 2, transition templates to the starterkit theme we moved a lot of templates from modules to Classy, the CSS that relies on the classes in Classy is still in the modules files

Proposed resolution

Move the CSS that relies on the HTML classes for every module. Ensure that the classes aren't being added in the module.

Remaining tasks

User interface changes

None for Classy, Stark will be more Stark

API changes

None

Comments

manjit.singh’s picture

Assigned: Unassigned » manjit.singh
manjit.singh’s picture

Assigned: manjit.singh » Unassigned
Status: Active » Needs review
StatusFileSize
new3.38 KB

moving forum css to classy :)

Status: Needs review » Needs work

The last submitted patch, 2: forum-to-classy-2489572-2.patch, failed testing.

manjit.singh’s picture

Status: Needs work » Needs review
StatusFileSize
new3.38 KB

clean for testbot :)

Status: Needs review » Needs work

The last submitted patch, 4: forum-to-classy-2489572-4.patch, failed testing.

sqndr’s picture

+++ b/core/modules/forum/forum.libraries.yml
@@ -1,5 +0,0 @@
-forum.index:

+++ b/core/themes/classy/classy.libraries.yml
@@ -3,3 +3,9 @@ base:
+forum-index:

+++ b/core/themes/classy/templates/dataset/forums.html.twig
@@ -14,6 +14,7 @@
+{{ attach_library('classy/forum-index') }}

Make sure to use forum.index (instead of forum-index). I think that is causing the tests to fail.

sqndr’s picture

I'll fix it.

sqndr’s picture

StatusFileSize
new5.2 KB

The forum.libraries.yml was now empty. I feel like it's pointless to leave an empty library file there, so I removed it. Checking what testbot says about this patch.

larowlan’s picture

Status: Needs work » Needs review
sqndr’s picture

Issue tags: +Needs screenshots
mortendk’s picture

Issue summary: View changes
Issue tags: -Needs screenshots
StatusFileSize
new4.2 KB
new235.25 KB
new272.72 KB

moved icons as well so they are now showing up ;)

screenshots:

aliyakhan’s picture

StatusFileSize
new111.53 KB

Looks cool. Attached more shots.

aliyakhan’s picture

Status: Needs review » Reviewed & tested by the community
aliyakhan’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
$build['#attached']['library'][] = 'forum/forum.index';

in Drupal\forum\Controller\ForumController. With this patch that library would be missing.

chernous_dn’s picture

Status: Needs work » Needs review
StatusFileSize
new11.08 KB

I transferred the image and code to to classy, remove template for module and removed $build['#attached']['library'][] = 'forum/forum.index';

Status: Needs review » Needs work

The last submitted patch, 16: forum-to-classy-2489572-16.patch, failed testing.

manjit.singh’s picture

@Chernous_dn patch file is corrupt.. Can you please look into it.

The last submitted patch, 16: forum-to-classy-2489572-16.patch, failed testing.

chernous_dn’s picture

Status: Needs work » Needs review
StatusFileSize
new9.16 KB

I fix patch for #16 comment.

star-szr’s picture

@Chernous_dn please update your git configuration to output easier to read patches for renames, most notably this chunk:

[diff]
  renames = copies

From https://www.drupal.org/documentation/git/configure

Thank you! :)

mortendk’s picture

StatusFileSize
new2.66 KB

updated the patch so its easier to read :)

do we want to move the image files as well - yes I say, but i remember some issues with icon'set or something?
- maybe wim is the right to ask there

chernous_dn’s picture

@Cottser Thanks)

lauriii queued 22: forum.diff for re-testing.

Status: Needs review » Needs work

The last submitted patch, 22: forum.diff, failed testing.

star-szr’s picture

Status: Needs work » Needs review
StatusFileSize
new4.29 KB

Rerolled.

lauriii’s picture

Status: Needs review » Reviewed & tested by the community
davidhernandez’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/themes/classy/classy.libraries.yml
rename from core/modules/forum/css/forum.theme.css
rename to core/themes/classy/css/forum/forum.theme.css

This should not go in a folder called 'forum'. It should go in the 'component' folder.

rainbowarray’s picture

Status: Needs work » Needs review
StatusFileSize
new4.28 KB
new602 bytes

Folder fixed.

davidhernandez’s picture

StatusFileSize
new366.96 KB
new227.66 KB

I think we'll need the weight change here. The file is ending up almost at the very end. I'm not sure why the ordering works out this way. Bartik and Classy are both added using component so why would Classy's end up so low?

with patch

after changing weight to -10

rainbowarray’s picture

StatusFileSize
new4.3 KB
new377 bytes

Here's the weight change.

davidhernandez’s picture

Thanks, Marc. We'll need to test the forum icon. I can't test right now, but when I first tested this I did not see the icon appear. Can someone check that?

lewisnyman’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new611.45 KB

I tested the patch with Classy and we do have a problem with the icon image. It seems that it's being copied over corrupted. I also noticed that aren't escaping some stuff?

lewisnyman’s picture

Status: Needs work » Needs review
lewisnyman’s picture

This should work

gints.erglis’s picture

StatusFileSize
new2.66 KB

Fixed patch apply errors.

akalata’s picture

Status: Needs review » Needs work

I can confirm the weight change from #30/31, but the new forum.css file isn't actually created so I'm missing the icons completely.

davidhernandez’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new314.47 KB
new2.64 KB
new866 bytes

@akalata can you double-check? I just applied the patch and it worked for me. The file should be in classy/css/components/forum.css. Or are you saying you don't see it get added to a forum page? I do see the icons appearing. See screenshot.

One minor change. I renamed the library.

manjit.singh’s picture

StatusFileSize
new138 KB

latest patch is working fine :)
Path of icon is /core/themes/classy/icons/forum-icons.png

w

akalata’s picture

Status: Needs review » Postponed

Found my error, patch -p1 wasn't creating the new files, but git apply works.

I would set RTBC at this point, instead postponing per #2566771: [Voltron patch] Move all remaining *.theme.css to Classy.

akalata’s picture

Status: Postponed » Closed (fixed)