Changing the size of the user picture preset can break the display of comments - the user picture can overflow its containing DIV, because it is hard coded to be 110px wide.

This is extremely fragile design and being a core theme should, at the very least, allow users to take advantage of the standard options in Drupal core - namely being able to change the user picture preset and not have their site blow up. All other core themes support this.

I have crafted a patch to fix this - but only for browsers that can support display: table-cell; which means that for IE6 and IE7 I have retained the original layout (float: left; width: 110px;) and simply added overflow: hidden; to hide the overflow should the user increase the size of their user pictures.

comment picture overflow

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jeff Burnz’s picture

Status: Active » Needs review
Issue tags: +RTL

sigh....

Jeff Burnz’s picture

Quick roundup screen-shot to show the difference in display:table-cell supporting browsers and IE6/7.

bartik-comment-picture-overflow-fixed.png

Jeff Burnz’s picture

Got a chance to refine this a bit more this evening and fixed the IE issues - this patch allows for resizing the user picture and works in all browsers I tested. The IE RTL stuff probably looks odd in that I am re-declaring position:absolute; on the comment arrow - but this is what I had to do to get it position the arrow correctly.

Tested in IE6, 7, 8, Chrome 5, Firefox 3.6 and Opera 10 with both threading and non-threading.

Seems to an issue with indentation on threaded comments in IE6 and 7, but that looks like an unrelated issue (another issue...).

Jeff Burnz’s picture

Issue tags: -RTL

Status: Needs review » Needs work
Issue tags: +RTL

The last submitted patch, bartik-comment-user-picture-895898_2.patch, failed testing.

markabur’s picture

Status: Needs work » Needs review
FileSize
2.42 KB

Here's a reroll. I've done a quick check in Safari, FF, IE7 and IE8, but nothing extensive.

Jeff Burnz’s picture

Cheers, will test tonight, what do you think of the approach?

markabur’s picture

I think it makes sense. I like seeing a good use for display:table-cell. :-)

And inline/float for old IEs is an ok way to make it work there. Looking at it now, are both of those needed? Doesn't floating sort of automatically force a display:block? In fact I just did a quick test without display:inline in ie.css and it looks fine.

Jeff Burnz’s picture

display: inline is there to mitigate any chance of float margin bugs in IE http://www.positioniseverything.net/explorer/floatIndent.html since this whole thing needs to be pixel perfect. Call it insurance...

markabur’s picture

Sounds good, nobody says IE has to be logical!

Jeff Burnz’s picture

jensimmons’s picture

Good catch!

Can we resize the image using CSS for IE 6 & 7? I'm afraid that someone who uses a modern browser will resize their user pictures, and think it looks great.... and never look at their site in IE 6&7... and so they won't know that the images are getting chopped off. We can shrink / enlarge the IE6/7 versions, and that will look less broken.

And have we tested this to see if it looks good when the user image size is shrunk down, not just made bigger?

Jeff Burnz’s picture

Patch in #6 fixes the chopped off overflow hidden hack I originally came up with so that should be no problem, ideally needs a new review as its been a while since I wrote this and can't remember even a single line!

tim.plunkett’s picture

tagging "Needs IE test"

Jeff Burnz’s picture

jensimmons’s picture

Priority: Normal » Major

In keeping track of what's most important to fix for Bartik, I'm going to bump this up to major. Users should be able to resize the user pictures, and have the comments work whether the new size is bigger or smaller than the default size.

amateescu’s picture

I tested this patch in IE 6/7/8, FF, Chrome (LTR & RTL) and everything looks great. Screenshots for IE attached.

bleen’s picture

bleen’s picture

Status: Needs review » Reviewed & tested by the community

As long as #6 turns green again, I'd say that it RTBC given #17 ... I've also looked in FF, Chrome & Safari and life is good

webchick’s picture

Status: Reviewed & tested by the community » Fixed

I can't think of a reason a CSS patch could cause testbot to fail (famous last words...), so committed #6 to HEAD.

Thanks for all the thorough testing!!

Status: Fixed » Closed (fixed)

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

markabur’s picture

Unintended side effect, when the comment has little text: #1000610: Bartik comment layout was borked recently