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

StatusFileSize
new2.27 KB

moving images css to classy :)

manjit.singh’s picture

Component: forum.module » image.module
Assigned: manjit.singh » Unassigned
Status: Active » Needs review
lewisnyman’s picture

Status: Needs review » Needs work
core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php:
  163  
  164      $element['#theme'] = 'image_widget';
  165:     $element['#attached']['library'][] = 'image/form';
  166  
  167      // Add the image preview.

We need to remove this attachment here.

The last submitted patch, 2: image-css-to-classy-2489574-2.patch, failed testing.

manjit.singh’s picture

StatusFileSize
new3 KB

removed code as per suggestion in #4

manjit.singh’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: image-css-to-classy-2489574-6.patch, failed testing.

lewisnyman’s picture

Issue tags: +Needs screenshots, +Seven

Nice, thanks. It looks like the test shouldn't be too hard to fix. We need to take screenshots before/after in Classy and Seven.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: image-css-to-classy-2489574-6.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: image-css-to-classy-2489574-6.patch, failed testing.

chernous_dn’s picture

Status: Needs work » Needs review
StatusFileSize
new2.85 KB

Update patch #6 I think that we need attach library to /core/themes/classy/templates/content-edit/image-widget.html.twig

Status: Needs review » Needs work

The last submitted patch, 14: move_image_theme_css_to-2489574-14.patch, failed testing.

star-szr’s picture

Status: Needs work » Needs review
StatusFileSize
new2.11 KB

Rerolled.

lauriii’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs screenshots

No visual changes so won't be uploading screenshots

davidhernandez’s picture

Why is the library called drupal.image?

lauriii’s picture

Status: Reviewed & tested by the community » Needs review

Actually to get this align with other issues we probably should remove that library

lewisnyman’s picture

@lauriii This was originally a separate library in the module, so I think it should stay a separate library in Classy?

lauriii’s picture

Oh yeah and its being loaded conditionally. We still should rename the drupal.image to only image.

lewisnyman’s picture

StatusFileSize
new1.23 KB
new2.13 KB

I renamed this library and the file to image-widget to better describe the contents.

lauriii’s picture

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

Should this go in a css/theme folder, since it is being added to the theme category?

lewisnyman’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/themes/classy/classy.libraries.yml
@@ -27,3 +27,9 @@ search.results:
+    theme:
+      css/components/image-widget.css: {}

Nope this is a component so we should switch to component.

jaxxed’s picture

Assigned: Unassigned » jaxxed

looks like you only need the 1 line change, I'll add that to your patch.

jaxxed’s picture

StatusFileSize
new2.13 KB
new365 bytes
new2.13 KB

just re-rolled with the small change. Couldn't find the right place to test it properly. Isn't this template supposed to load on any image field edit?

jaxxed’s picture

doh! double uploaded.

jaxxed’s picture

OK, I made a mess out of the last upload, so I am going to just upload it again.

jaxxed’s picture

Status: Needs work » Needs review
StatusFileSize
new2.13 KB
new365 bytes

just re-rolled with the small change. Couldn't find the right place to test it properly. Isn't this template supposed to load on any image field edit?

(2nd attempt at upload, repeating #29)

lewisnyman’s picture

Status: Needs review » Postponed

It looks like this can't be tested until #2511036: image-widget.html.twig never gets used (image_widget gets overridden by FieldWidget::process) is committed so setting to postponed for now.

lewisnyman’s picture

Status: Postponed » Needs review

Now we can test this patch

lewisnyman’s picture

Assigned: jaxxed » Unassigned
StatusFileSize
new2.14 KB

Reroll.

lewisnyman’s picture

Issue summary: View changes
StatusFileSize
new791.38 KB

It loads! Setting to RTBC/postponed.

davidhernandez’s picture

Did you mean to change the status?

lewisnyman’s picture

Status: Needs review » Postponed

Yes :P Thanks

akalata’s picture

Status: Postponed » Closed (fixed)