Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#6415 closed defect (bug) (fixed)

Sidebar name in widgets admin screen not styled properly

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by: mdawaffe's profile mdawaffe
Milestone: 2.8 Priority: low
Severity: trivial Version: 2.5
Component: Widgets Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

If you give a sidebar a weird and very long name, the layout gets messed up because of the drop down's length.

register_sidebar(array(

'id' => 'broken_sidebar_name',
'name' => 'Very Long Sidebar Name That Will Make the Widgets Admin Screen Look Horribly Broken.'
));

Attachments (1)

6415.diff (1.4 KB) - added by mdawaffe 17 years ago.

Download all attachments as: .zip

Change History (8)

#1 @lloydbudd
17 years ago

  • Milestone set to 2.5
  • Owner changed from anonymous to mdawaffe

#2 @mdawaffe
17 years ago

  • Status changed from new to assigned

Tricky since both the select and the input have completely unknown width.

I'm not sure what the best (non-JS) solution is here; my CSS-fu isn't strong enough.

I think the "right" thing to do would be to tell those two elements (the select and the input) to fill up up to 100% of the available width and no more. If they need more room, the input should get as much as it needs, and the select should be truncated.

I don't have any idea how to do that.

I've experimented a bit with setting both element's max-width to be ~50%. This is a bad approximation to the above algorithm that works well enough in FF. I'll test it in other browsers before sending a patch.

If someone has a better solution, please grab this ticket and patch it.

#3 @lloydbudd
17 years ago

  • Milestone changed from 2.5 to 2.6

#4 follow-up: @Denis-de-Bernardy
17 years ago

setting the select's width to 80% will likely work.

#5 in reply to: ↑ 4 @mdawaffe
17 years ago

  • Keywords has-patch 2nd-opinion added

Replying to Denis-de-Bernardy:

setting the select's width to 80% will likely work.

Unless "Show" is a longer word in some other language.

Here's a patch that sets the max-width of each to 50%. It works in FF2/3, Opera9, Safari3, IE6/7.

Again, I'm not sure this is the best solution.

@mdawaffe
17 years ago

#6 @ryan
16 years ago

  • Component changed from Administration to Widgets

#7 @Denis-de-Bernardy
16 years ago

  • Milestone changed from 2.9 to 2.8
  • Resolution set to fixed
  • Status changed from assigned to closed

closing as fixed with #9511

Note: See TracTickets for help on using tickets.