Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#26202 closed defect (bug) (fixed)

Plugin install/update thickbox title should truncate at 103 characters

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

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 11 years ago.
Multi lines on thickbox breaks styling
26202.patch (1.3 KB) - added by kstover 11 years ago.
Patch to truncate Plugin names greater than 70 characters
truncation_fix.png (132.8 KB) - added by kstover 11 years ago.
26202.2.patch (1.3 KB) - added by usayd 11 years ago.
Patch using correct syntax

Download all attachments as: .zip

Change History (18)

@usayd
11 years ago

Multi lines on thickbox breaks styling

#1 @kstover
11 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
11 years ago

Patch to truncate Plugin names greater than 70 characters

#2 @kstover
11 years ago

  • Keywords has-patch added; needs-patch removed

#3 @kstover
11 years ago

  • Version 3.5.2 deleted

#4 @usayd
11 years ago

  • Version set to 3.5.2

Tested in 3.8 beta, works great. Nice work.

#5 @usayd
11 years ago

  • Version 3.5.2 deleted

#6 @kstover
11 years ago

  • Version set to trunk

#7 @kstover
11 years ago

  • Cc kevin@… added

#8 @jameslaws
11 years ago

  • Cc jameslaws added

#9 @ocean90
11 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
11 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
11 years ago

Patch using correct syntax

#11 @azaozz
11 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
11 years ago

  • Component changed from Administration to Plugins
  • Focuses administration added

#13 @helen
10 years ago

  • Milestone changed from Awaiting Review to 4.0

General improvements being worked on in #27440.

#14 @helen
10 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from new to 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.