#18690 closed task (blessed) (fixed)
Change the display layout of help tabs
Reported by: | jane | Owned by: | koopersmith |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | UI | Keywords: | has-patch dev-feedback needs-testing |
Focuses: | Cc: |
Description (last modified by )
In-admin help is cool. But! There's so much of it! All that scrolling and a mountain of long-line-length rows that are hard to read (let alone scan) on complex screens makes it much less effective than it should be. Let's redesign the inside of the help layers. Break each screen's help content into smaller bits (Overview, Display, Actions, whatever is applicable per screen) and have those labels on left, readable line-length content in the middle, and the more info links on the right. See attached sketch.
Koop will set it up if no one beats him to it, but it would be awesome if someone beat him to it, because he's working on the new user and new feature bits. If someone makes the structure today, we can have afternoon hackathon people help make patches to do the content splitting up parts this afternoon.
Attachments (11)
Change History (64)
#2
@
13 years ago
+1
I had thought about splitting the content into two columns but this is a better idea.
The help box max-height could do with being increased too, maybe to 300px.
#3
@
13 years ago
Thinking that would be a good place to split in columns using css3 as it only contains text (and eventually images?). This would make scaling for responsive admin a lot better.
#4
@
13 years ago
Quick example of how that would look. Of course the columns will be switchable to 2 or 1 depending on screen width.
#6
@
13 years ago
@azaozz: I do not want that 3-column text layout. The whole point is less text on screen, more clicky things. :)
#7
@
13 years ago
Hacked on this @ #wcpdx. Two others were doing:
- content output from add_contextual_help()
- CSS formatting
Tab JS wasn't decided, but I can't work on it tomorrow. Here's my suggested method for common.dev.js. Needs corrected id|classes (from, http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/):
$(document).ready(function() { //When page loads... $(".tab_content").hide(); //Hide all content $("ul.tabs li:first").addClass("active").show(); //Activate first tab $(".tab_content:first").show(); //Show first tab content //On Click Event $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab_content").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content $(activeTab).fadeIn(0); //Show content from active ID, 0=>instant return false; }); });
@
13 years ago
Modified .wp-admin/includes/template.php, to output nested divs. TO-WORK REQUIRES: nested array of content from add_contextual_help(), CSS formatting. (!!! Currently outputs debugging content from add_contextual_help(), MUST-REMOVE for production !!!)
#8
@
13 years ago
Hey #wcpdx guys, I couldn't make it in today to meet with you guys but added some checks to my PHP code from yesterday:
1.) It checks to see if the tab_title is empty, if not it processes the value in the array. If not, no output, but it still doesn't check for unique tab_titles.
2.) I added a forced array-output in the add_contextual_help() method. Please remove it once you have valid array-nesting in the doc files.
---
In general, this code always checks if the content is in an array or not (so no need to update all the docs files at-once). If it's a string (like old content) then it outputs in old style. If it's an array then it checks for the keys 'contextual-help-tabs' and 'contextual-help-links' & if they exist then outputs as we discussed yesterday.
@
13 years ago
Expands on the patch to template.php in 18690.template.php.diff above, and an example of the markup as applied to one admin page (edit-form-advanced.php)
#10
@
13 years ago
- Cc natebedortha added
Couple things to note:
-The height of the help container needs to be declared in fixed units, in two places in the CSS (noteworthy in case the height gets changed in the future, as discussed.)
-Both ul.contextual-help-tabs and div.contextual-help-links have overflow: auto on them in case they go too long. It won't be pretty, but the content will be accessible.
-It still looks good, even if help gets a boring old string, not a fancy new array.
Thanks guys, I had a lot of fun with this.
#12
@
13 years ago
- Owner changed from jane to koopersmith
Working on the text breakdowns with @dougwrites, Koop will be looking over the code.
#15
@
13 years ago
This is all good, but add_contextual_help() is something I want to deprecate. We've been talking about turning the $current_screen object into a proper WP_Screen class and have methods like add_help_tab(), add_help_link(), and so on.
#16
@
13 years ago
We briefly discussed making WP_Screen a singleton in IRC. I'm game if anyone wants to have a go.
#17
@
13 years ago
I like where 18690.2.diff goes and the new functionality and ui layout it implements.
Great improvement on the current help system.
#19
@
13 years ago
Daryl and I talked about making screen options one of the tabs in the new help layout. Showed the idea to 7 people during testing the last two days, seemed to go over well. Let's try to work this in.
#30
@
13 years ago
- Open Help on Posts screen.
- Click "Screen Options" tab.
- Click "Screen Info" tab.
- There'll be two scrollbars (see the screenshot).
Tested in Firefox 7, Chrome 14.
#37
@
13 years ago
Closed #18856 as a duplicate of this. - Plugins page needs to be updated to use $current_screen->add_help_tab()
#39
follow-up:
↓ 41
@
13 years ago
Jumping the gun on this, but is there any informal documentation regarding how themes / plugins that add their own admin screens should be making use of WP_Screen?
#40
in reply to:
↑ 38
;
follow-up:
↓ 42
@
13 years ago
Replying to dd32:
Yes, most screens will have to be converted to using WP_Screen, we will do that while revising the help text.
Replying to GaryJ:
You shouldn't precede an argument that has no default value, with one that has.
Was 50/50 whether to swap the order of args or make the first one optional. Currently $current_screen->add_option()
is used for both the built-in options (screen layout, table columns, etc.) and for the HTML for custom options. The first requires option_mane and an array, the second is just the HTML string.
Alternatively we could split the method into two: $current_screen->add_default_option($name, $settings)
and $current_screen->add_custom_option($html)
.
#41
in reply to:
↑ 39
;
follow-up:
↓ 43
@
13 years ago
Replying to GaryJ:
Not much documentation yet since it's still in development. The idea is to use add_action('add_screen_help_and_options', '...'); and then $current_screen->add_help_tab()
and/or $current_screen->add_option()
.
#42
in reply to:
↑ 40
;
follow-up:
↓ 44
@
13 years ago
Replying to azaozz:
Alternatively we could split the method into two:
$current_screen->add_default_option($name, $settings)
and$current_screen->add_custom_option($html)
.
That would be my preference, since they are then more self-documenting via the method and argument names.
How about just keeping the first method as add_option()
(since I suspect this would be used for more often to tweak one of the existing options, than adding a whole new option)?
#43
in reply to:
↑ 41
@
13 years ago
Replying to azaozz:
Replying to GaryJ:
Not much documentation yet since it's still in development. The idea is to use add_action('add_screen_help_and_options', '...'); and then
$current_screen->add_help_tab()
and/or$current_screen->add_option()
.
Thanks. So, in summary, it's just for dealing with all the fluffy bits, that the Settings API doesn't cover for the main body of an admin page?
#44
in reply to:
↑ 42
@
13 years ago
Replying to GaryJ:
That would be my preference, since they are then more self-documenting via the method and argument names.
Actually we can check if the second arg is an array and add it accordingly. Not a big fan of adding two functions that do approximately the same thing :)
#46
@
13 years ago
Following a discussion in #wordpress-dev it was decided to use the old functions and the new API (WP_Screen) in parallel in 3.3 and revisit it again in 3.4.
In that terms we can (should?) add get_column_headers(), get_hidden_columns() and get_hidden_meta_boxes() equivalents in WP_Screen so we can deprecate the stand-alone functions later.
#47
@
13 years ago
18690.widgets-accessibility-mode.patch is an attempt to restore screen options for Widgets screen, missing since [18853].
#48
@
13 years ago
Please post all patches and comments regarding WP_Screen on #18785. I'm working through all of it now. Thanks. This is the ticket for help only.
#49
@
13 years ago
Wrong ticket, see https://core.trac.wordpress.org/ticket/18785#comment:17 :)
#50
@
13 years ago
- Resolution set to fixed
- Status changed from reviewing to closed
At this point, I think this feature is in. Should do the tab content changes on a separate ticket. I'm working on those, will make ticket. Bugs found with help tabs from here on should get their own bug ticket opened.
Sketch of new help layout proposal