WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 8 months ago

Last modified 6 months ago

#15925 closed enhancement (fixed)

Improving the admin UI for Hierarchical Taxonomies

Reported by: husobj Owned by: nacin
Priority: normal Milestone: 3.5
Component: UI Version: 3.0.3
Severity: normal Keywords: has-patch ui-feedback
Cc: contact@…, code@…, r_a_m_i@…

Description

For hierarchical taxonomies like categories on the edit post in the admin pages, the terms are listed with checkboxes in a scrollable box which has a set height of 200px. If you only have a few terms then the box ends up being much bigger than needed wasting lots of vertical screen real estate. This is particularly frustrating if you create multiple hierarchical taxonomies.

I propose changing the height of the box to use css max-height instead so that the box collapses if you only have a few terms.

See the screengrabs at he post I've written here.
http://www.benhuson.co.uk/2010/12/20/improving-the-ui-for-hierarchical-taxonomies-in-wordpress/

I've attached a preliminary patch too.

Obviously IE6 doesn't support css max-height. Do we need to use an IE hack for this or are we OK if the category box height doesn't restrain in IE6?

Attachments (7)

wp-admin.dev.css.patch (572 bytes) - added by husobj 2 years ago.
wp-admin.dev.css patch
15925.patch (759 bytes) - added by SergeyBiryukov 22 months ago.
15925.after.png (7.2 KB) - added by SergeyBiryukov 22 months ago.
15925.2.patch (689 bytes) - added by SergeyBiryukov 9 months ago.
15925.after.2.png (13.6 KB) - added by SergeyBiryukov 9 months ago.
15925.3.patch (392 bytes) - added by SergeyBiryukov 8 months ago.
15925.4.patch (946 bytes) - added by SergeyBiryukov 8 months ago.

Download all attachments as: .zip

Change History (33)

husobj2 years ago

wp-admin.dev.css patch

comment:1 scribu2 years ago

  • Keywords has-patch commit added; taxonomy ui admin removed
  • Milestone changed from Awaiting Review to Future Release

Seems like a straightforward enhacement.

comment:2 vteixeira2 years ago

This is one of those small things that makes a difference. +1

comment:3 jane2 years ago

  • Keywords ui added

@scribu: I'm not sure why you removed the ui keyword. Adding back in.

comment:4 scribu2 years ago

Oups... didn't see it.

comment:5 ocean902 years ago

  • Component changed from Taxonomy to UI
  • Keywords ui-feedback added; ui removed

We have no ui trac keyword.

comment:6 husobj2 years ago

To support IE6 I guess we could add something into the ie admin stylesheet: /wp-admin/css/ie.css

height: expression( this.scrollHeight > 200 ? "200px" : "auto" ); /* sets max-height for IE */

comment:7 husobj2 years ago

...actually scratch that. Not needed as you can just keep the height declaration in the IE stylesheet

comment:8 empireoflight2 years ago

Great idea

comment:9 follow-up: JohnONolan2 years ago

With about 5px of padding-bottom added, I think this is a really great idea.

comment:10 SergeyBiryukov22 months ago

  • Milestone changed from Future Release to 3.3

comment:11 in reply to: ↑ 9 ; follow-up: nacin22 months ago

Replying to JohnONolan:

With about 5px of padding-bottom added, I think this is a really great idea.

Can John or someone verify and patch this?

SergeyBiryukov22 months ago

comment:12 husobj22 months ago

Doh, you just got in there before me with that patch ;)

SergeyBiryukov22 months ago

comment:13 in reply to: ↑ 11 ; follow-up: SergeyBiryukov22 months ago

Replying to nacin:

With about 5px of padding-bottom added, I think this is a really great idea.

Can John or someone verify and patch this?

I've added 0.8em, and now the padding to the left and to the bottom is equal (if that's the desired result). See the screenshot.

The space above the tab is more narrow than in 3.2.1, probably due to other CSS changes elsewhere.

comment:14 scribu22 months ago

  • Keywords commit removed

The space above the tab is more narrow than in 3.2.1, probably due to other CSS changes elsewhere.

Probably from #18314. We should fix that in this patch too.

comment:15 jane21 months ago

@azaozz, would this patch be impacted by any of the CSS changes you've been working on, or any of the responsive admin stuff?

comment:16 ryan21 months ago

  • Milestone changed from 3.3 to Future Release

Punting enhancements from 3.3.

comment:17 stephenh198810 months ago

  • Cc contact@… added

SergeyBiryukov9 months ago

comment:18 in reply to: ↑ 13 SergeyBiryukov9 months ago

  • Milestone changed from Future Release to 3.5

Replying to SergeyBiryukov:

The space above the tab is more narrow than in 3.2.1, probably due to other CSS changes elsewhere.

Not anymore. Refreshed the patch, also reduced vertical padding. Screenshot: 15925.after.2.png.

We already have flexible height on the Menus screen, 15925.2.patch makes it consistent.

Tested in Firefox 15, Chrome 21, IE 7, IE 8, Opera 12.

comment:19 tar.gz9 months ago

  • Cc code@… added

Great! I'm sure this little improvement is especially useful now that more and more WP users are:

  • accessing the web from mobile devices with limited screen size.
  • using custom taxonomies rather than one gigantic list of categories.

Tested successfully in Firefox 17 (OSX), Safari 5 (OSX), Safari on iOS 5 (iPod).

Note: ocean90 has voiced some concerns regarding a "jump" than can occur when switching from the All Categories to Most Used tab – but I think that's a very minor downside vs the benefit in screen estate.

comment:20 nacin9 months ago

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

In [21971]:

Use max-height rather than height for the hierarchical taxonomy admin metabox. props SergeyBiryukov, husobj. fixes #15925.

comment:21 nacin8 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This could also use a min-height: http://cl.ly/image/2k3a3M0J2T0J

I also would not like to see a jump for All to Most Used.

SergeyBiryukov8 months ago

SergeyBiryukov8 months ago

comment:22 SergeyBiryukov8 months ago

15925.3.patch adds min-height.

15925.4.patch also makes both tabs have equal height (not sure if that's necessary though).

comment:23 lessbloat8 months ago

I tested both. +1 for 15925.3.patch.

comment:24 ryan8 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In [22290]:

Add min-height to hierarchical taxonomy meta box. Props SergeyBiryukov. fixes #15925

comment:25 follow-up: ramiy6 months ago

  • Cc r_a_m_i@… added

Can you do the same on the Quick-Edit?

I have 4 hierarchical taxonomies on Quick-Edit, it would be nice if it will be less longer.

comment:26 in reply to: ↑ 25 SergeyBiryukov6 months ago

Replying to ramiy:

Can you do the same on the Quick-Edit?

Feel free to create a new ticket for that.

Note: See TracTickets for help on using tickets.