Problem/Motivation

image-widget.html.twig has a reference to

{{ attach_library('classy/image-widget') }}

But the library doesn't exist in classy.libraries.yml

Proposed resolution

two possible solutions:

  • Add the library in the classy.libraries.yml file (see #5)
  • Remove the library from classy and just add it into Seven to avoid break classy based themes (see #15)

See #31, #32, #48, #53

Remaining tasks

Improve the comment in the css file, explaining why that file is not used in the classy theme and why we cannot remove it.

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#90 interdiff.txt653 bytesstar-szr
#86 2641380-86.patch2.39 KBdarketaine
#86 interdiff-2641380-85-86.txt1.55 KBdarketaine
#85 2641380-85.patch2.4 KBdarketaine
#85 interdiff-2641380-84-85.txt670 bytesdarketaine
#84 2641380-84.patch2.39 KBdarketaine
#84 interdiff-2641380-82-84.txt1.6 KBdarketaine
#82 2641380-82.patch2.36 KBjoelpittet
#82 interdiff-80-82.txt1.12 KBjoelpittet
#80 image_widget_html_twig-2641380-80.patch2.35 KBgnuget
#80 interdiff-2641380-70-80.txt1.19 KBgnuget
#79 Screen Shot 2016-09-03 at 10.43.55 PM.png51.58 KBdavidhernandez
#70 image_widget_html_twig-2641380-70.patch2.38 KBgnuget
#70 2641380-interdiff-64-70.txt1.15 KBgnuget
#64 image_widget_html_twig-2641380-64.patch2.02 KBgnuget
#64 2641380-interdiff-63-64.txt1.87 KBgnuget
#63 image_widget_html_twig-2641380-63.patch2.26 KBchernous_dn
#61 interdiff-59-61.txt707 bytesmohit_aghera
#61 image_widget_html_twig-2641380-61.patch2.94 KBmohit_aghera
#59 interdiff-32-59.txt525 bytesmohit_aghera
#59 image_widget_html_twig-2641380-59.patch2.93 KBmohit_aghera
#46 image_widget_html_twig-2641380-46.patch935 byteschernous_dn
#41 test_seven.png67.96 KBchernous_dn
#33 after.png17.85 KBchernous_dn
#33 before.png18.27 KBchernous_dn
#32 interdiff.txt1.47 KBdinarcon
#32 image_widget_html_twig-2641380-32.patch2.81 KBdinarcon
#26 with-patch.png49.63 KBdinarcon
#26 without-patch.png52.92 KBdinarcon
#26 image_widget_html_twig-2641380-26.patch2.99 KBdinarcon
#15 issue-2641380-15-8.patch2.99 KBgnuget
#5 Issue-2641380-by-hass-imagewidgethtmltwig-references.patch741 byteshass
#3 drupal-add-image-widget-library-2641380-3-8.patch490 bytesgnuget
#3 with_library.png45.11 KBgnuget
#3 without_library.png48.72 KBgnuget

Comments

hass created an issue. See original summary.

gnuget’s picture

Hi!

The file indeed exists you can find it at:

core/themes/classy/css/components/image-widget.css

UPDATE: ohh you are right, the image-widget is not declared in the classy.libraries.yml, so this seems a bug.

gnuget’s picture

Status: Active » Needs review
StatusFileSize
new48.72 KB
new45.11 KB
new490 bytes

This how image-preview looks right now:

without library

And this is how it looks adding the library in the classy.library.yml file:

without library

And I attach a patch with the code for add this library in the classy.library.yml file.

Thanks!

hass’s picture

I'm confused... first you said

UPDATE: ohh you are right, the image-widget is not declared in the classy.libraries.yml, so this seems a bug.

This is still true after your patch? Why are you now adding a CSS file to classy/base? This still does not fix the attaching in image-widget.html.twig!? Maybe the proper fix is this?

[classy.libraries.yml]

image-widget:
  version: VERSION
  css:
    component:
      css/components/image-widget.css: { weight: -10 }
hass’s picture

gnuget’s picture

True, I was confused about how the libraries thing work, #5 looks great :-)

hass’s picture

Now it works as intended... thanks for great hint and brainstorming.

Can you RTBC this patch, please?

gnuget’s picture

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

  • catch committed 6d1232f on 8.1.x
    Issue #2641380 by gnuget, hass: image-widget.html.twig references a non-...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.1.x, thanks!

While this is a straight bugfix, it's potentially a visual change for a subtheme of classy, so I don't think it can go into a patch release.

hass’s picture

This means we need to wait 6 months to get bugs fixed in D8? Really?

Please commit to 8.0, too.

catch’s picture

Status: Fixed » Needs work

If we were going to fix this in 8.0;x, I'd remove the dead CSS (or move it to Seven) and the reference in the template, then there's no change for subclassing themes.

I think that's the right fix in general so reverted from 8.1.x for now.

  • catch committed 37ddcca on 8.1.x
    Revert "Issue #2641380 by gnuget, hass: image-widget.html.twig...
gnuget’s picture

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

In this patch I moved the library to seven and removed the reference from classy

hass’s picture

Status: Needs review » Needs work

Nope. Why has this rolled back for 8.1 now? The fix was correct. Moving the file does not fix the classy and other themes. Please leave the old fix in.

I only asked why we need to wait for such a bugfix 6 months to a release. All classy based themes are affected, but this could be noted in release notes and we are done, too. This patch does not break anything - it just fixed a visual bug. If there is a classy based theme it may has already overridden this styles or just ignored it. Nothing to worry.

Now thats going too far.

davidhernandez’s picture

This can break themes because CSS that was mistakenly not included before is now suddenly included. If someone added their own CSS to account for it, that will suddenly cause a problem. It would likely be slight, but still.

I could also argue that since it creates any visual change, and would go in 8.1, that it could have a change record.

gnuget’s picture

Agree with #17 and even also agree with 13 any of those approach is good to me.

joelpittet’s picture

Depending on the visual bugs this may cause I'd keep it in 8.0.x and let the committer decide. Probably just needs to go into Bartik as well but I think #15 patch is going in the right direction for this fix.

star-szr’s picture

Title: image-widget.html.twig references a non-exististing classy/image-widget library » image-widget.html.twig references a non-existing classy/image-widget library
gnuget’s picture

Status: Needs work » Needs review

And 8.1 is almost out and this fix is not part of the core :-/

I will move it to "needs review" again at this point doesn't matter if should go at 8.1 or 8.0

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.

gnuget’s picture

Version: 8.1.x-dev » 8.2.x-dev
Issue summary: View changes

Moving to 8.2.x because 8.1.x is out and this introduce a little visual change, also I updated the issue Summary.

gnuget’s picture

Issue summary: View changes
gnuget’s picture

Issue summary: View changes
dinarcon’s picture

Issue summary: View changes
StatusFileSize
new2.99 KB
new52.92 KB
new49.63 KB

The patch at number at #15 needed reroll. I have done that and tested it. It looks good. Thanks @gnuget!

Without patch:

With patch:

dinarcon’s picture

Status: Needs review » Reviewed & tested by the community

The tests have passed. Marking as RTBC.

davidhernandez’s picture

Status: Reviewed & tested by the community » Needs review

Please don't rtbc your own patches. Someone else will need to review it.

dinarcon’s picture

Hi @davidhernandez. I just did the reroll. Since no code changes were made and I tested the patch I thought it was ok to mark the issued RTBC. I was not aware I could not mark the issue RTBC in such a case. Thanks for setting it back to needs review.

omers’s picture

Status: Needs review » Reviewed & tested by the community

The reroll on #26 works fine :)

star-szr’s picture

Status: Reviewed & tested by the community » Needs work

Thanks, a couple points:

  1. diff --git a/core/themes/classy/css/components/image-widget.css b/core/themes/classy/css/components/image-widget.css
    deleted file mode 100644
    

    I think we should probably just leave this file and potentially just add a comment to say that it's not being loaded by Classy. Someone could be referencing this from their theme, maybe even fixing the bug in their own theme. I think that is possible but I might be wrong.

  2. +++ b/core/themes/seven/templates/content-edit/image-widget.html.twig
    @@ -0,0 +1,24 @@
    +<div{{ attributes }}>
    +    {% if data.preview %}
    +        <div class="image-preview">
    +            {{ data.preview }}
    +        </div>
    +    {% endif %}
    +    <div class="image-widget-data">
    +        {# Render widget data without the image preview that was output already. #}
    +        {{ data|without('preview') }}
    +    </div>
    +</div>
    

    Indentation in this file looks off, 4 spaces instead of 2. It should have the same indentation as Classy's image-widget.html.twig.

dinarcon’s picture

Status: Needs work » Needs review
StatusFileSize
new2.81 KB
new1.47 KB

Thanks for your review @Cottser. The new patch also attaches the 'seven/image-widget' library from image-widget.html.twig as the Classy template did.

chernous_dn’s picture

StatusFileSize
new18.27 KB
new17.85 KB

Test patch #32 , works fine. attach screenshots.

chernous_dn’s picture

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

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/themes/classy/css/components/image-widget.css
    @@ -1,6 +1,10 @@
    + * This file is not being loaded by Classy.
    + *
    + * @see https://www.drupal.org/node/2641380
    

    This is very unsatisfactory. We should at least say why it is not being loaded, and therefore why this file then still exists.

  2. +++ b/core/themes/seven/templates/content-edit/image-widget.html.twig
    @@ -0,0 +1,24 @@
    +<div{{ attributes }}>
    +  {% if data.preview %}
    +    <div class="image-preview">
    +      {{ data.preview }}
    +    </div>
    +  {% endif %}
    +  <div class="image-widget-data">
    +    {# Render widget data without the image preview that was output already. #}
    +    {{ data|without('preview') }}
    +  </div>
    +</div>
    

    This is identical to Classy's template!

    This should therefore use {% extends … %}, and just do the {{ attach_library(…) }}.

gnuget’s picture

Hi! Wim Leers

Thanks for your review!

2. We cannot use {% extends .. %} because as far as I know with extends we must overwrite a theme parent block and classy's image-widget.html.twig template have none of those, I tried using the usekeyword instead of extends but I got this error:

wig_Error_Runtime: Template "@classy/content-edit/image-widget.html.twig" cannot be used as a trait

So I'm not sure how to do this without copy/pasting the entire template and adding there the library.

miss I something?

Thanks!

wim leers’s picture

You don't need to use Twig blocks at all. You can do things like:

{% extends "image.html.twig" %}
{%
set classes = [
  style_name ? 'image-style-' ~ style_name|clean_class,
]
%}
{% set attributes = attributes.addClass(classes) %}
chernous_dn’s picture

Hi, Wim Leers.
But we dont have in seven image.html.twig, we need create image.html.twig. Or you mean include from another place?

wim leers’s picture

That was just an example. Here, it would be:

core/themes/seven/templates/content-edit/image-widget.html.twig would contain:

{% extends "@classy/content-edit/image-widget.html.twig" %}
{{ attach_library('seven/image-widget') }}
chernous_dn’s picture

Status: Needs work » Needs review
StatusFileSize
new67.96 KB

I think best solution, use #5 patch. Just include image-widget.css in classy. Classy
сomponents works in seven too. And we dont need move to seven additional files.

gnuget’s picture

Hi @Wim Leers.

I already tried what you suggested (I just did it again just to make sure) and this is the error I got:

The website encountered an unexpected error. Please try again later.

Twig_Error_Syntax: A template that extends another one cannot have a body in "core/themes/seven/templates/content-edit/image-widget.html.twig" at line 14. in Twig_Parser->filterBodyNodes() (line 379 of vendor/twig/twig/lib/Twig/Parser.php).

I investigated that error and I found out to this error is related to what I mentioned at #37 I think your example at #38 is working because doesn't print anything in the image.html.twig theme but not sure.

[update] I tried using {% set something %} and yes the error is gone so the problem is when we try to print something outside of a block I don't think the {% extends %} approach is gonna work for this particular case. :(

wim leers’s picture

My bad. This is what that should look like:

{% extends "@classy/content-edit/image-widget.html.twig" %}
{% attach_library('seven/image-widget') %}
gnuget’s picture

Sorry for being a pain.

I tried what you suggested and I got a new error:

Twig_Error_Syntax: Unknown "attach_library" tag in "core/themes/seven/templates/content-edit/image-widget.html.twig" at line 14. in Twig_Parser->subparse() (line 178 of vendor/twig/twig/lib/Twig/Parser.php).

And checking the documentation https://www.drupal.org/developing/api/8/assets

Attaching a library in a twig template

You can also attach a library in a twig template by using the attach_library() twig function. So in any *.html.twig:

{{ attach_library('contextual/drupal.contextual-links') }}
<div>Some markup {{ message }}</div>

It seems to actually we must use {{ extends }} instead of{% extends %}

thanks for all your help and time.

David.

gnuget’s picture

Status: Needs review » Needs work

And while Wim Leers doesn't be happy with the fix this still will need work.

chernous_dn’s picture

Status: Needs work » Needs review
StatusFileSize
new935 bytes

{% extends %} and attach_library dont work together in one file core\themes\seven\templates\content-edit\image-widget.html.twig So I decided include image-widget.css in classy theme. And add in seven dependence from classy.

davidhernandez’s picture

Status: Needs review » Needs work

If the only thing in the template is the extends line, then there is no need for the template. I'm wondering why the attach_library didn't work there. We should figure that out.

gnuget’s picture

Hi @Chernous_dn

The initial bug is to the image-widget.css is missing in the classy theme, the approach to you took at #46 was already explorer at #5, We didn't committed this approach because:

  • This will change the UI and that is a major change.
  • Maybe other themes already fixed this issue in their own subtheme so we cannot just remove the attach_library in the classy image-widget.html.twig
  • You cannot add just the file in the library's file in the classy theme because classy already use it and it could break subthemes.

The alternative suggested at #31 is:

  • Left the css file and the attach_library in the classy image-widget.html.twig, It means, we must leave the bug in case a subtheme already fixed it (adding the css in the libraries yml file) and just leave a comment in the CSS file explaining why that file is not used at all in the classy theme and why we leave it, so here we must explain to the file was never added in the libraries classy theme (bug!) but it could be added in a subtheme so we cannot just remove it and we cannot just added it in the classy libraries file either because that could break other subthemes.
  • We cannot change classy but we can change Seven, so we can just add the library in seven and this should be fixed but we have the problem exposed at #35 where we must copy the entire TPL and just ad the library which is not desired, so basically we are stuck here.

Hi David.

What do you mean with the attach_library didn't work there?

davidhernandez’s picture

He said in #46 they didn't work in the same file.

gnuget’s picture

He said in #46 they didn't work in the same file.

I explained why at: #37.

Thanks for your time on this :-)

davidhernandez’s picture

We can do more in an extended template than override a parent block. A block is needed for overriding the parent html content, and other content related things. If the attach_library is indeed not working in an extended template, we may need to investigate why. That sounds like a bug.

gnuget’s picture

Do you mean the extends need to be wrapped up in a {{...}} instead of {%...%}?

Sorry, I don't understand the problem yet, but if you think it is a bug would be great if you create a follow up explaining the problem and I will do my best trying to provide a fix/patch

Thanks!

davidhernandez’s picture

Ack, ok. I see. attach_library is a function not a tag, so it can't be executed directly.

...I don't like the idea of modifying the parent template to make this work so it looks like #32 was actually correct.

gnuget’s picture

In that case, we just need to fix 35.1 and this should be ready to go. :-D

chernous_dn’s picture

Hi @gnuget,
Thanks for the explanation.

gnuget’s picture

Issue summary: View changes
Issue tags: +Novice

Updating the summary of the ticket and adding the novice tag.

gnuget’s picture

Issue summary: View changes
gnuget’s picture

mohit_aghera’s picture

Status: Needs work » Needs review
StatusFileSize
new2.93 KB
new525 bytes

Updating comment in patch #32

gnuget’s picture

Status: Needs review » Needs work

Hi @mohit_aghera.

Sorry the message is not enough, we need to explain WHY that CSS file is in the classy theme but is not used, I'm not a native speaker but we need something like:

This CSS file is not used in this theme (see https://www.drupal.org/node/2641380) but it's preserved so any other subtheme can use it. This file should be added in the image-widget.html.twig file.

mohit_aghera’s picture

Status: Needs work » Needs review
StatusFileSize
new2.94 KB
new707 bytes

Hi @gnuget
It's fine. I've updated message as per your suggestion. Please have a look at it.

wim leers’s picture

If the attach_library is indeed not working in an extended template, we may need to investigate why. That sounds like a bug.

+1

I don't like the idea of modifying the parent template to make this work

+1

so it looks like #32 was actually correct.

-1

This is absolutely unacceptable.


This is a bug in Twig, because it definitely is intended to work this way — they even fixed a bug related to this some time ago: https://github.com/twigphp/Twig/issues/426. This is why I'm so confused about this not working. It really should work.

Actually, it works fine. See #2387069-47: {% extends "foo.html.twig" %} in Twig templates does not respect theme inheritance + #2387069-48: {% extends "foo.html.twig" %} in Twig templates does not respect theme inheritance, which also use this.

Actually, both of those are wrong: they're for set(), not for custom functions. There's several similar issues in Twig's issue queue: https://github.com/twigphp/Twig/search?q=A+template+that+extends+another....

I think the answer could be simpler in the mean time: let Seven's image-widget.html.twig do this:

{% include "@classy/content-edit/image-widget" %}
{{ attach_library('seven/image-widget') }}
chernous_dn’s picture

StatusFileSize
new2.26 KB

Use #61 and #62 comment. Create patch.

gnuget’s picture

Hi Chernous_dn

Here you are doing exactly the same as #32 (repeating a file in a different theme).

+++ b/core/themes/classy/templates/content-edit/image-widget.html.twig
similarity index 100%
copy from core/themes/classy/css/components/image-widget.css

copy from core/themes/classy/css/components/image-widget.css
copy to core/themes/seven/css/components/image-widget.css

I just attached a new version of the patch fixing this problem.

  • catch committed 37ddcca on 8.3.x
    Revert "Issue #2641380 by gnuget, hass: image-widget.html.twig...
  • catch committed 6d1232f on 8.3.x
    Issue #2641380 by gnuget, hass: image-widget.html.twig references a non-...

  • catch committed 37ddcca on 8.3.x
    Revert "Issue #2641380 by gnuget, hass: image-widget.html.twig...
  • catch committed 6d1232f on 8.3.x
    Issue #2641380 by gnuget, hass: image-widget.html.twig references a non-...
gnuget’s picture

Issue tags: -Novice

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

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now 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.

wim leers’s picture

Status: Needs review » Needs work

Looks good now, with the exception of the comment IMO still being confusing:

+++ b/core/themes/classy/css/components/image-widget.css
@@ -1,6 +1,12 @@
+ * This CSS file is not used in this (Classy) theme. But it’s preserved so any
+ * other subtheme can use it. This file should be added in the
+ * image-widget.html.twig file.

Here's my suggestion:

This CSS file is not used in this theme (Classy). It was intended to be used, but
due to a bug, Drupal 8 shipped with it not being used. To not break backwards
compatibility, we continue to not load it it in Classy. Every subtheme of Classy
is encouraged to use it, by attaching the classy/image-widget asset library in
their image-widget.html.twig file.

@see core/themes/seven/templates/content-edit/image-widget.html.twig.

@todo In Drupal 9, let core/themes/classy/templates/content-edit/image-widget.html.twig attach the classy/image-widget asset library.
gnuget’s picture

Status: Needs work » Needs review
StatusFileSize
new1.15 KB
new2.38 KB

I just updated the comment with your suggestion.

Thanks!

wim leers’s picture

Assigned: Unassigned » star-szr
Status: Needs review » Reviewed & tested by the community

Thanks! I think it's ready now. Cottser should be the one to commit this. Also curious to hear what @davidhernandez thinks.

star-szr’s picture

Assigned: star-szr » davidhernandez

This looks much better than the last time I saw it, interesting use of include as well - I'm assuming someone has tested that :)

@davidhernandez what do you think about this approach?

xjm’s picture

Status: Reviewed & tested by the community » Needs review

NR for @davidhernandez' feedback, because I almost compulsively assigned this to @Cottser which would not have helped. :)

hass’s picture

9 months, 73 comments of useless discussion for one line of change that fixes a serious interface bug.

Are you all totally crazy? What a waste of time. I think we have more importants issues to fix and my first patch should simply get committed.

hass’s picture

gnuget’s picture

Are you all totally crazy? What a waste of time. I think we have more importants issues to fix and my first patch should simply get committed.

It was committed but you complained about it and was reverted.

But that let us work in a better fix so thank you :-)

hass’s picture

No, I only complained that it was not committed to 8.0 and not in general about the commit. In reaction to just this question it was reverted and we still waiting a year later, 80 comments later and tons of hours waste of time only to get this into mainline without any good change to the original fix. You will only add another bullsh** fix that requires again a lot of work in D9. Great job and the issue is still not fixed.

We better change the rule that stable is allowed to receive BUGFIXES.

davidhernandez’s picture

@hass, feel free to spend your time on something else you feel is less of a waste. Participation here is not compulsory. There is no reason to be riled by a bug lkie this. It is easily fixable on a project.

Looking now.

davidhernandez’s picture

Status: Needs review » Needs work
StatusFileSize
new51.58 KB

1) What we have lost with this bug is the floating of the thumbnail, compacting that area. So it's good to keep this CSS and encourage its use, but it is not functionally critical. It's good to fix that in Seven.

2) The comment is fine. I didn't poor over it, but everyone else seems happy with it.

3) Classy is frozen, but this is fine to remove since it does not function and it does not alter markup.

+++ b/core/themes/classy/templates/content-edit/image-widget.html.twig
@@ -10,7 +10,6 @@
-{{ attach_library('classy/image-widget') }}

4) The alignment of the image and form needs fixing. I'm not sure if I would recommend doing that in the Classy CSS or just Seven, but that can be handled in a follow up issue. It is not the result of this issue, but this bug is probably why it wasn't noticed before release.

5) I hadn't noticed this before, but is there a reason why this was put into a subfolder in Seven? Seven doesn't use subfolders for any other templates. If there is no reason for it, this file should be in the main folder.

+++ b/core/themes/classy/css/components/image-widget.css
@@ -1,6 +1,16 @@
+ * @see core/themes/seven/templates/content-edit/image-widget.html.twig.

6) Classy should be capitalized in this comment.

+++ b/core/themes/seven/templates/content-edit/image-widget.html.twig
@@ -0,0 +1,12 @@
+ * Include from classy theme.

7) Not the fault of this issue, but we ended up with a blank line at the the top of the file, no @file comment, and no blank line before the rules begin. I'm not clear if we required @file in CSS as a rule, but this is consistent in all the other Classy CSS files. We should fix that while we're here.

+++ b/core/themes/classy/css/components/image-widget.css
@@ -1,6 +1,16 @@
 
 /**
  * Image upload widget.
+ *

Functionally, everything looks fine. The solution works. 5, 6, and 7 are my only issues. They are simple corrections. If those are resolved/clarified, the solution is RTBC to me.

gnuget’s picture

Status: Needs work » Needs review
StatusFileSize
new1.19 KB
new2.35 KB

Hi! davidhernandez

Here a patch with 5,6 and 7 fixed.

Thanks!

davidhernandez’s picture

Status: Needs review » Needs work
+++ b/core/themes/classy/css/components/image-widget.css
@@ -1,6 +1,16 @@
+ * @see core/themes/seven/templates/content-edit/image-widget.html.twig.
+ *
+ * @todo In Drupal 9, let core/themes/classy/templates/content-edit/image-widget.html.twig attach the classy/image-widget asset library.
  */
 .image-preview {
   float: left; /* LTR */

I hate being pedantic, but can you add the blank line after the comment to be consistent with the other CSS files?

joelpittet’s picture

Status: Needs work » Needs review
StatusFileSize
new1.12 KB
new2.36 KB

Did you mean wrap to 80 characters or am I missing a standard that you mentioned in #81 @davidhernandez?

davidhernandez’s picture

No, I meant the blank line after the comment and before the first set of rules. I don't know if we standardized it, but Classy's other CSS files are consistent with that.

darketaine’s picture

StatusFileSize
new1.6 KB
new2.39 KB

Added the blank line between comments and first code line in all files needed

darketaine’s picture

StatusFileSize
new670 bytes
new2.4 KB

Taking also into account the 80 chars limit

darketaine’s picture

StatusFileSize
new1.55 KB
new2.39 KB

Ok, removed the break line from twig files (my bad) and made the comment more readable (thanks @davidhernandez)
Sorry for the noise :/

davidhernandez’s picture

Assigned: davidhernandez » Unassigned
Status: Needs review » Reviewed & tested by the community

Thanks!

xjm’s picture

Assigned: Unassigned » star-szr

Back to @Cottser then. Thanks all.

  • Cottser committed ae16101 on 8.3.x
    Issue #2641380 by gnuget, darketaine, Chernous_dn, dinarcon,...
star-szr’s picture

Assigned: star-szr » Unassigned
Status: Reviewed & tested by the community » Fixed
StatusFileSize
new653 bytes

Looks good, thanks for the additional tweaks @darketaine @joelpittet @gnuget!

I made one minor change on commit and that was to move the library declaration higher up to preserve our beautifully alphabetized classy.libraries.yml, hope nobody objects. Interdiff attached to show that change.

Committed ae16101 and pushed to 8.3.x. Thanks!

wim leers’s picture

preserve our beautifully alphabetized classy.libraries.yml

Nice attention to detail! :D

davidhernandez’s picture

Can't believe I missed that. :( Thanks, Cottser!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

danquah’s picture

Did that followup issue mentioned in 4) in #79 ever get created? We just have a customer reporting the suddenly floating image as a bug and it took quite a while to track the cause back to this issue, would probably have gone a bit faster if it had been tracked by an issue.

(I'll happily create the issue, just no point in make a duplicate if it has already been done)

gnuget’s picture

(I'll happily create the issue, just no point in make a duplicate if it has already been done)

As far as I know, the follow-up was never created. please feel free to do it.

Thanks!