WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#22554 closed defect (bug) (fixed)

New media: Long file names overflow container

Reported by: johnbillion Owned by: ryan
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description

As per description.

Attachments (3)

capture.png (6.3 KB) - added by johnbillion 6 years ago.
22554.diff (583 bytes) - added by koopersmith 6 years ago.
22554.2.diff (1.1 KB) - added by koopersmith 6 years ago.

Download all attachments as: .zip

Change History (16)

@johnbillion
6 years ago

#1 in reply to: ↑ description @Nasarullahmari
6 years ago

  • Keywords reporter-feedback added
  • Type changed from defect (bug) to feature request

Replying to johnbillion:

As per description.

Its nice hear about you,i am new here in this disscussions, hope we good interaction in future wd eachother.

Many thnkx.

#2 @SergeyBiryukov
6 years ago

  • Keywords reporter-feedback removed
  • Type changed from feature request to defect (bug)

#3 @koopersmith
6 years ago

  • Keywords needs-patch added

Ah. This is due to removing the overflow: hidden; on the attachment view.

#4 @koopersmith
6 years ago

  • Milestone changed from Awaiting Review to 3.5

#5 @nacin
6 years ago

Should we additionally break-word this?

#6 @miqrogroove
6 years ago

Does break-word actually work? I tried using it recently to no avail.

#7 follow-up: @GregLone
6 years ago

Hello.

includes/css/media-views.css - line 561:

.attachment .filename {
	/*...*/
	overflow: hidden;
	text-overflow: ellipsis;
}

This works, but imho this is not the best thing to do because we can see only 10 characters at best. I think this is a better way:

.attachment .filename {
	/*...*/
	overflow: hidden;
	word-wrap: break-word;
	max-height: 99px;
}

This way we can see longer file names. (the max-height is for veeeeeery long file names)

@koopersmith
6 years ago

#8 @koopersmith
6 years ago

Patch provides better handling for long filenames (no overflow, break word, fit within container, etc).

#9 in reply to: ↑ 7 @koopersmith
6 years ago

  • Keywords has-patch added; needs-patch removed

Replying to GregLone:

Hello.

Hi, GregLone, and welcome! In the future, instead of providing specific code changes in a comment, please create a patch. Patches make it much easier for other developers to apply and test your changes consistently.

I've converted some of your suggestions into a patch (with improvements to the max-height section, as the size of the grid is dynamic).

#10 @nacin
6 years ago

What is left here? Basic testing across all the browsers down to IE8 or so?

#11 @koopersmith
6 years ago

Firefox has a relatively minor sad.

@koopersmith
6 years ago

#12 @koopersmith
6 years ago

  • Keywords commit added

Fixes titles in Chrome, Firefox, Safari, Opera, and IE.

#13 @ryan
6 years ago

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

In 22870:

Fix overflow of long filenames in the media modal.

Props koopersmith, GregLone
fixes #22554

Note: See TracTickets for help on using tickets.