Opened 10 years ago
Last modified 4 months ago
#37228 new enhancement
Consider to rethink and improve the list tables pagination links
| Reported by: | afercia | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Administration | Version: | 7.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | ui, javascript, administration |
Description
Splitting this out from #33962. See also #32558.
Quickly discussed at WCEU 2016 Vienna's Contributor Day with @karmatosed and @hugobaeta and noticed the pagination links offer room for design improvements. Looks like there are no apparent reasons (other than historical ones) why the top and bottom pagination links should differ and maybe the editable input field should be displayed only when there are more than 3 pages.
As @helen pointed out, also the interactions could benefit from some rethink.
This would probably be a very nice ticket for designers willing to contribute :)
Current state on 4.6 trunk:
with longer translated strings:
Attachments (9)
Change History (13)
#2
in reply to: ↑ 1
@
10 years ago
Replying to hugobaeta:
I had proposed in our conversation we switch both to a consistent pattern on top and bottom, one based on context: if there are less than 3 pages, show the "simple navigation" (no input, since the user can navigate all the pages, up to 3, with the first/previous/next/last buttons); if there are more than 3 pages, then we use the "input navigation", as it will help the user get to any page more quickly.
Thoughts?
This sounds good to me.
#4
@
4 months ago
- Focuses javascript administration added
- Keywords has-patch added; has-screenshots needs-patch removed
- Version → trunk
I have attached two .diff patches (one for PHP and one for JS) to unify both top and bottom paginations, showing the input field only when there are 4 or more pages.
In wp-admin/includes/class-wp-list-table.php, inside the pagination() method, instead of checking if it is top or bottom first, I now check the total number of pages ($total_pages). After that, I check for top only to preserve the accessibility features provided by the original label for the input.
In common.js, I removed a couple of lines and, at the end of the main wrapper (IIFE), I added an event listener to catch the Enter key press (key 13).
Tested on WP 7.0 RC. It works fine in my local tests.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)


Like you said and shown with the screenshots, there are currently two UI patterns for table navigation:
I had proposed in our conversation we switch both to a consistent pattern on top and bottom, one based on context: if there are less than 3 pages, show the "simple navigation" (no input, since the user can navigate all the pages, up to 3, with the first/previous/next/last buttons); if there are more than 3 pages, then we use the "input navigation", as it will help the user get to any page more quickly.
Thoughts?