WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 3 months ago

#26202 new defect (bug)

Plugin install/update thickbox title should truncate at 103 characters

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

Download all attachments as: .zip

Change History (16)

usayd5 months ago

Multi lines on thickbox breaks styling

comment:1 kstover5 months 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.

kstover5 months ago

Patch to truncate Plugin names greater than 70 characters

comment:2 kstover5 months ago

  • Keywords has-patch added; needs-patch removed

kstover5 months ago

comment:3 kstover5 months ago

  • Version 3.5.2 deleted

comment:4 usayd5 months ago

  • Version set to 3.5.2

Tested in 3.8 beta, works great. Nice work.

comment:5 usayd5 months ago

  • Version 3.5.2 deleted

comment:6 kstover5 months ago

  • Version set to trunk

comment:7 kstover5 months ago

  • Cc kevin@… added

comment:8 jameslaws5 months ago

  • Cc jameslaws added

comment:9 ocean905 months 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;
}

comment:10 usayd5 months 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.

usayd5 months ago

Patch using correct syntax

comment:11 azaozz5 months 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.

comment:12 nacin3 months ago

  • Component changed from Administration to Plugins
  • Focuses administration added
Note: See TracTickets for help on using tickets.