Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#26202 closed defect (bug) (fixed)

Plugin install/update thickbox title should truncate at 103 characters

Reported by: usayd Owned by: helen
Priority: normal Milestone: 4.0
Component: Plugins Version: 3.8
Severity: minor Keywords: has-patch
Cc: Focuses: administration

Description

When plugin title exceeds 103 chars thickbox styling breaks. This would apply for install themes too.

Tested across Win/Mac, Chrome, FF.

Can be tested with live plugin titled 'MyGeoPosition.com Geotagging: Geotags / GeoMetatags / GeoFeedtags / GeoMicroformats / Maps '

Suggested fix: Truncate titles at 100 characters, add ellipsis ...

Attachments (4)

multiline_tb.png​ (5.1 KB ) - added by usayd 13 years ago.
Multi lines on thickbox breaks styling
26202.patch​ (1.3 KB ) - added by kstover 13 years ago.
Patch to truncate Plugin names greater than 70 characters
truncation_fix.png​ (132.8 KB ) - added by kstover 13 years ago.
26202.2.patch​ (1.3 KB ) - added by usayd 13 years ago.
Patch using correct syntax

Download all attachments as: .zip

Change History (18)

@usayd
13 years ago

Multi lines on thickbox breaks styling

#1 @kstover
13 years ago

I was able to reproduce, and I've attached a patch to fix.

If the name of the plugin is greater than 70 characters, the patch truncates the name and adds ellipses.

@kstover
13 years ago

Patch to truncate Plugin names greater than 70 characters

#2 @kstover
13 years ago

  • Keywords has-patch added; needs-patch removed

#3 @kstover
13 years ago

  • Version 3.5.2

#4 @usayd
13 years ago

  • Version → 3.5.2

Tested in 3.8 beta, works great. Nice work.

#5 @usayd
13 years ago

  • Version 3.5.2

#6 @kstover
13 years ago

  • Version → trunk

#7 @kstover
13 years ago

  • Cc kevin@… added

#8 @jameslaws
13 years ago

  • Cc jameslaws added

#9 @ocean90
13 years ago

Please use … for the hellips and mb_substr() for truncating.

To be responsive we can also add some CSS like

#TB_ajaxWindowTitle {
	-o-text-overflow: ellipsis;
	text-overflow:    ellipsis;
	width: 90%;
	white-space: nowrap;
	overflow: hidden;
}

#10 @usayd
13 years ago

Attached patch for original using correct syntax.

Your CSS suggestion works great. I would use it within a media query instead, that way width can be reduced to 70% so it resizes to 320px screens.

@usayd
13 years ago

Patch using correct syntax

#11 @azaozz
13 years ago

Thinking the CSS fix is enough in this case. The advantage is it works for any width, including responsive/small screens, and the string doesn't need to be cut at 70 chars.

#12 @nacin
13 years ago

  • Component Administration → Plugins
  • Focuses administration added

#13 @helen
12 years ago

  • Milestone Awaiting Review → 4.0

General improvements being worked on in #27440.

#14 @helen
12 years ago

  • Owner set to helen
  • Resolution → fixed
  • Status new → closed

In 29040:

Improvements to the plugin information modal:

  • Show the banner image when available.
  • Show contributors and ratings breakdown in the FYI box.
  • Show reviews in a tab.

props stephdau, tellyworth, paulwilde, michalzuber. see #27440. fixes #19784, #22599, #26202.

Note: See TracTickets for help on using tickets.