WordPress.org

Make WordPress Core

Opened 15 months ago

Closed 8 months ago

#26202 closed defect (bug) (fixed)

Plugin install/update thickbox title should truncate at 103 characters

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

Download all attachments as: .zip

Change History (18)

@usayd15 months ago

Multi lines on thickbox breaks styling

comment:1 @kstover15 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.

@kstover15 months ago

Patch to truncate Plugin names greater than 70 characters

comment:2 @kstover15 months ago

  • Keywords has-patch added; needs-patch removed

@kstover15 months ago

comment:3 @kstover15 months ago

  • Version 3.5.2 deleted

comment:4 @usayd15 months ago

  • Version set to 3.5.2

Tested in 3.8 beta, works great. Nice work.

comment:5 @usayd15 months ago

  • Version 3.5.2 deleted

comment:6 @kstover15 months ago

  • Version set to trunk

comment:7 @kstover15 months ago

  • Cc kevin@… added

comment:8 @jameslaws15 months ago

  • Cc jameslaws added

comment:9 @ocean9015 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 @usayd15 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.

@usayd15 months ago

Patch using correct syntax

comment:11 @azaozz15 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 @nacin13 months ago

  • Component changed from Administration to Plugins
  • Focuses administration added

comment:13 @helen8 months ago

  • Milestone changed from Awaiting Review to 4.0

General improvements being worked on in #27440.

comment:14 @helen8 months 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.