Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, image-style-name.patch, failed testing.

RobLoach’s picture

Status: Needs work » Needs review
FileSize
1.58 KB

Adding in the class attributes help?

Status: Needs review » Needs work

The last submitted patch, image-style-name.patch, failed testing.

eojthebrave’s picture

Status: Needs work » Needs review
FileSize
1.91 KB

Ooh. I like this.

andypost’s picture

Issue tags: +Needs tests

This require a tests to ensure that class injected

tim.plunkett’s picture

Assigned: Unassigned » tim.plunkett
Status: Needs review » Postponed
Issue tags: -image styles

Postponing on #1696416: Regression: theme_image_style() is broken.
I'll work on this once that's in.

tim.plunkett’s picture

Priority: Minor » Normal
FileSize
2.86 KB

Well, went ahead and rolled it anyway. Assumes the other issue was committed.

tim.plunkett’s picture

Status: Postponed » Needs review
Issue tags: -Needs tests
FileSize
2.87 KB

Rerolled since that went in.

Status: Needs review » Needs work

The last submitted patch, drupal-1175764-8.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
8.89 KB

Had to add the class to output in a couple other places.

Status: Needs review » Needs work

The last submitted patch, dfrupal-1175764-10.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
9.7 KB

Missed one more.

RobLoach’s picture

Status: Needs review » Reviewed & tested by the community

Thanks Tim!

Dries’s picture

+++ b/core/modules/image/image.moduleundefined
@@ -1197,6 +1197,8 @@ function theme_image_style($variables) {
   $variables['height'] = $dimensions['height'];
 
+  $variables['attributes']['class'][] = 'image-style-' . drupal_html_class($variables['style_name']);

Any reason we prefix the style name (with 'image-style-')? Just wondering as it seems a bit redundant to me.

RobLoach’s picture

We prefix the style name with image-style- so that it doesn't conflict with any other class names. If you had an image style named "item-list", for example, it would conflict with the .item-list class that we use in listed items.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Postponed

The changes to other tests that don't even care about this class are not ideal. Postponing this on #1706878: Add WebTestBase::assertThemeOutput() to allow modules to test theme function output

tim.plunkett’s picture

Status: Postponed » Reviewed & tested by the community

Nevermind, this seems a necessary evil.

catch’s picture

Issue tags: -Needs backport to D7

#12: drupal-1175764-12.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs backport to D7

The last submitted patch, drupal-1175764-12.patch, failed testing.

tim.plunkett’s picture

tim.plunkett’s picture

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

no brainer

Dries Arnolds’s picture

Will this be comitted to D7 as well? Or just D8?

tim.plunkett’s picture

@Pixelstyle it's tagged for backport, but that decision lies with the branch maintainer. Either way, it has to go into D8 first.

webchick’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Seems like a nice improvement, and we are currently under thresholds.

Committed and pushed to 8.x.

Since this is only adding a new class, and not changing any existing ones, I think backporting it is probably kosher (subject to overruling by David_Rothstein, of course).

tim.plunkett’s picture

Assigned: tim.plunkett » Unassigned

I don't have time to reroll this myself, but it wouldn't be too hard.

danillonunes’s picture

Status: Patch (to be ported) » Needs review
FileSize
6.89 KB

I don't know if I ported all the tests correctly, let's look at what the bot says.

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-1175764-by-tim.plunkett-Rob-Loach-eojthebrave-.patch, failed testing.

danillonunes’s picture

danillonunes’s picture

Status: Needs work » Needs review
lukus’s picture

Just tried to apply this and received the error:

error: patch failed: modules/image/image.module:1262
error: modules/image/image.module: patch does not apply

Does it need to be re-rolled for the latest version of 7.x ?

tim.plunkett’s picture

Status: Needs review » Needs work
Issue tags: +Needs backport to D7

The last submitted patch, 0001-Issue-1175764-by-tim.plunkett-Rob-Loach-eojthebrave-.patch, failed testing.

danillonunes’s picture

Status: Needs work » Needs review
FileSize
9.46 KB

The patch does apply to latest 7.x branch using git am. I think there are some image tests added later that are failing. Let's try this.

  • webchick committed e75f890 on 8.3.x
    Issue #1175764 by tim.plunkett, Rob Loach, eojthebrave: Added Have theme...

  • webchick committed e75f890 on 8.3.x
    Issue #1175764 by tim.plunkett, Rob Loach, eojthebrave: Added Have theme...

  • webchick committed e75f890 on 8.4.x
    Issue #1175764 by tim.plunkett, Rob Loach, eojthebrave: Added Have theme...

  • webchick committed e75f890 on 8.4.x
    Issue #1175764 by tim.plunkett, Rob Loach, eojthebrave: Added Have theme...

  • webchick committed e75f890 on 9.1.x
    Issue #1175764 by tim.plunkett, Rob Loach, eojthebrave: Added Have theme...