Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28883 closed defect (bug) (fixed)

Plugin details lightbox screwing up plugins with large names in 4.0

Reported by: hardeepasrani's profile hardeepasrani Owned by: helen's profile helen
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Plugins Keywords: has-patch needs-testing
Focuses: ui Cc:

Description

I was trying the new plugin installer & found that the pop-up window is screwing plugin with largeeee names.

Example: https://wordpress.org/plugins/sexy-contact-form/

Attachments (12)

Plugin lightbox.png (148.0 KB) - added by hardeepasrani 10 years ago.
Pretty large, huh?
28883-overflow.diff (558 bytes) - added by tellyworth 10 years ago.
Crude fix - smaller max-width and overflow:auto
28883.2.diff (1.3 KB) - added by michalzuber 10 years ago.
overflow:hidden, span with title attrib
28883.3.diff (1.4 KB) - added by michalzuber 10 years ago.
Added text-overflow: ellipsis; props melchoyce
28883.4.diff (1.3 KB) - added by melchoyce 10 years ago.
28883.5.diff (1.6 KB) - added by melchoyce 10 years ago.
28883.6.diff (1.9 KB) - added by michalzuber 10 years ago.
Added fix for mobile and without banner
28883.diff (2.1 KB) - added by johnbillion 10 years ago.
28883.7.diff (844 bytes) - added by stephdau 10 years ago.
28883.7-widthonly.diff (1.2 KB) - added by stephdau 10 years ago.
28883.8.diff (1.1 KB) - added by stephdau 10 years ago.
28883.9.diff (1.1 KB) - added by stephdau 10 years ago.

Download all attachments as: .zip

Change History (42)

@hardeepasrani
10 years ago

Pretty large, huh?

#1 @ocean90
10 years ago

  • Focuses ui added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.0

#2 @ocean90
10 years ago

  • Summary changed from Pluing details lightbox screwing up plugins with large names in 4.0 to Plugin details lightbox screwing up plugins with large names in 4.0

@tellyworth
10 years ago

Crude fix - smaller max-width and overflow:auto

#3 @tellyworth
10 years ago

  • Keywords has-patch added; needs-patch removed

@michalzuber
10 years ago

overflow:hidden, span with title attrib

#5 @melchoyce
10 years ago

Can we add overflow: ellipsis to make the cutoff less awkward?

@michalzuber
10 years ago

Added text-overflow: ellipsis; props melchoyce

#6 @michalzuber
10 years ago

Thanks melchoyce, awesome, didn't know that this feature exists in CSS :)
http://i.imgur.com/uemRQY9.png

@melchoyce
10 years ago

#7 @melchoyce
10 years ago

28883.4.diff drops the border-radius on the titles down to 3px from 8px, to better match the rest of the admin.

#8 @ocean90
10 years ago

  • Keywords needs-patch added; has-patch removed

#9 follow-up: @melchoyce
10 years ago

Sorry, unsure how I messed that one up... Reuploading now.

@melchoyce
10 years ago

#10 @melchoyce
10 years ago

We should also add ellipses for plugins without banner images: https://cloudup.com/cF7GvXWwA-9

#11 in reply to: ↑ 9 @ocean90
10 years ago

Replying to melchoyce:

Sorry, unsure how I messed that one up... Reuploading now.

I wasn't clear enough: We can't use width: 700px as it breaks on smaller screens, max-width: 100% should work. Also the close icon shouldn't overlap the title.

@michalzuber
10 years ago

Added fix for mobile and without banner

This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.


10 years ago

#14 @johnbillion
10 years ago

If we relatively position the header container and then give the plugin name a bottom position rather than a top, we can allow the title to correctly wrap to multiple lines. Much better than cutting off the end of the plugin name.

Patch coming up after I've done some more fiddling/testing.

Last edited 10 years ago by johnbillion (previous) (diff)

@johnbillion
10 years ago

#15 @johnbillion
10 years ago

  • Keywords needs-testing added

28883.diff does as I mentioned above to achieve the following:

https://i.imgur.com/9WdXDd3.png

What it doesn't do, however, is quite get the layout correct at narrower widths. I can't get the container to respect the max-width:100% property when it's got white-space:nowrap. Any ideas anyone?

https://i.imgur.com/6Ybk3cS.png

#16 @stephdau
10 years ago

Note that the layout itself is being updated to match the plugins repository's one better in #27440.
Our patches are conflicting at time of writing.

Not sure which one will get committed 1st, so I thought I'd mention it, so we don't get surprise conflicts at the last minute. Long titles handling is one of the last 3 issues remaining to deal with to close #27440.

I was going to ask you to apply that work to the common patch there, but it might not be the best idea if we have outstanding issues with both of our patches/solutions. Let's just "keep in touch". :)

This ticket was mentioned in IRC in #wordpress-dev by johnbillion. View the logs.


10 years ago

#18 @helen
10 years ago

What do we need to do here? Right now it just gets chopped off.

@stephdau
10 years ago

#19 @stephdau
10 years ago

The patch needed to be refreshed, based on the changes committed in r29474.

I've looked at the gist of it, and was able to get to what I think is a decent handling in attachment:28883.7.diff. But as you can see in the last screenshot of https://cloudup.com/cN4DcBMqDi5, I've noticed that our banner handling is sketchy at smaller width (but tall) because we decide to switch to the other mode based on the screen height.

attachment:28883.7-widthonly.diff is the same as 28883.7.diff, but by detecting small-screen mode based on screen width<771px, like the rest, not height<500px. Any narrow screen can benefit from the smaller banner. This could also be its own ticket, but I figured I'd give you the option to do either.

See https://cloudup.com/czeF7wzz-07

Last edited 10 years ago by stephdau (previous) (diff)

This ticket was mentioned in IRC in #wordpress-dev by stephdau. View the logs.


10 years ago

#21 @johnbillion
10 years ago

On wordpress.org, the plugin title wraps to multiple lines if it's too long, rather than truncating (example).

https://i.imgur.com/N4uGcZ1.png

This was what I was aiming for in 28883.diff, but I couldn't get the truncation to work correctly at narrower screen sizes, which you've managed to do. I'm now taking a look at 28883.7-widthonly.diff to see if I can combine the two.

@stephdau
10 years ago

#22 @stephdau
10 years ago

Was decided to go with the width-detection only option in weekly chat.

attachment:28883.8.diff improves on 28883.7-widthonly.diff.

This ticket was mentioned in IRC in #wordpress-dev by stephdau. View the logs.


10 years ago

#24 @shooper
10 years ago

I was able to replicate the original problem using the 'Creative Contact Form - The Best WordPress Contact Form Builder' plugin.

Applied the patch and tested dialog at multiple screen sizes. Truncates properly.

#25 @jmiloj
10 years ago

I tested this functionality and also had the plugin name overflow its container.

I applied the patch, and it solved the issue.
Tested on Mac on FF 29.0.1 and Chrome on 36.0.1985.125, in multiple screen widths.

Here was a long plugin name without a banner image I also tested.
https://wordpress.org/plugins/chicago-housing-widget-powered-by-everyblock/

#26 @helen
10 years ago

  • Keywords needs-refresh added

@stephdau
10 years ago

#27 @stephdau
10 years ago

attachment:28883.9.diff is a patch refresh, as requested.

This ticket was mentioned in IRC in #wordpress-dev by stephdau. View the logs.


10 years ago

#29 @stephdau
10 years ago

  • Keywords needs-refresh removed

#30 @helen
10 years ago

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

In 29605:

Plugin details:

Prevent plugins with long names from looking bad and breaking layouts.

props stephdau. fixes #28883.

Note: See TracTickets for help on using tickets.