Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

#3410 closed defect (bug) (fixed)

Looooooooooooong text in activity updates don't wrap.

Reported by: intermike's profile InterMike Owned by:
Milestone: 1.5 Priority: normal
Severity: minor Version: 1.5
Component: Core Keywords: 2nd-opinion
Cc: DJPaul

Description

If you post a really looooooooooooooooooooooooooooong(...) word with no spaces, it doesn't wrap around to the next line (so you can read it), it just goes hidden under the right sidebar.

Change History (7)

#1 @boonebgorges
14 years ago

  • Cc DJPaul added
  • Keywords 2nd-opinion added

I'm pretty sure this is a browser limitation. The only thing we can do about wrapping in the bp-default code has to do with white-space: nowrap; but this requires that there be spaces in the content.

A more programmatic solution (force a break after a certain number of characters) would be intrusive in non-alphabetic languages, and would anyway be unpredictable based on browser settings such as font zoom.

The only possible consideration would be to change overflow settings so that the text streams off the screen. At least that would allow it to be read, instead of hiding it behind the sidebar. DJPaul, do you have an opinion on this?

#2 @DJPaul
14 years ago

Setting word-wrap: break-word on the paragraph tags in question will let the browser break long strings, without spaces, wherever. On .activity-inner p, maybe.

#3 @boonebgorges
14 years ago

Do we want to do that, though? Seems rude to break up words :)

#4 @DJPaul
14 years ago

Yeah, I wasn't sure. I used this in r4887 to fix long author names in blog posts' avatar box, but because that was such a tiny space, it's a different situation. One might argue, too, that a sufficiently long word here is likely to be closer to spam than part of the discussion.

Worried about changing overflow on the parent div(s) as we could be using it to clear a float somewhere (I haven't check all possibly activity stream entries to see if we are).

#5 @boonebgorges
14 years ago

Thanks, DJPaul - I didn't know about word-wrap before this, but I just tested it and it looks good! I think it's actually a pretty reasonable solution. Breaking up words is rude :) but as you point out, it's likely that it'll only happen in borderline spammy cases anyway, and in those cases it's more important to render properly than to be polite.

#6 @boonebgorges
14 years ago

  • Milestone changed from Awaiting Review to 1.5

#7 @boonebgorges
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4909]) Adds word-wrap: break-word to activity item content, in case of extremely long words. Fixes #3410. Props DJPaul

Note: See TracTickets for help on using tickets.