Opened 9 years ago
Closed 9 years ago
#33962 closed defect (bug) (fixed)
List table: pagination links on small screens break in two lines
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Administration | Keywords: | has-patch has-screenshots commit |
Focuses: | ui | Cc: |
Description
Follow up to #32253.
After the changes to width/min-width and padding in #32253 the pagination links can break in two lines on small screens, see screenshot below.
We should always allow plugins to use numbers/text instead of the arrows so no fixed width but adjusting the padding in a proper media query should fix this.
We should also consider that when there are hundreds of pages, the input size gets bigger (and the links size too, of course).
Attachments (6)
Change History (28)
#3
@
9 years ago
- Keywords needs-patch added; needs-testing has-patch removed
Thanks @erayalakese. Tested a bit your patch and noticed setting a negative value for the top padding is an invalid value. Browsers discard the whole padding declaration and apply the padding inherited from the rule outside the media query (which is padding: 3px 5px 7px;
).
I'd suggest to try to make the spans/links perfect squares with a size of 41px x 41px, applying a padding of padding: 9px 11px 12px;
should work.
Also, there's no need to patch the RTL and minified files, they're generated during the build process. The preferred way to generate patches is from the root of your SVN checkout, all the file paths inside the patch should begin with src/...
The Git format is accepted too. For more details please see: https://make.wordpress.org/core/handbook/tutorials/working-with-patches/
#5
in reply to:
↑ 4
@
9 years ago
Replying to pavelevap:
Please see how it looks in our localized version...
@pavelevap hi, to my understanding (I've googled for that so I may be totally wrong) that sounds more like a complete sentence, something like "out of a total of" that would be too long in English too. Would it be possible to translate with a shorter term? I can't think of a better solution here, given the very limited space.
#6
@
9 years ago
Maybe we should have a different navigation for mobile? Or remove parts which aren't essential, like the input field?
#7
@
9 years ago
Yes, it is a little bit longer because when using only "z" (as "of") we have different format, for example "1 z 1", "1 ze 2", "1 z 57", etc. Our language is not very good for short strings... I love English and its "from" which can be used anywhere :-)
But I am thinking about replacing "1 of 57", translated "1 z celkem 57" to simple "1 / 57"? It could be also in English original and without localization, because it is used as common pattern?
#8
follow-up:
↓ 9
@
9 years ago
If a slash "/" is appropriate for all languages, then maybe we could also simplify the code. We just need a hidden expanded string as target for aria-describedby
, something like "Current page: 1 of 57" or "Aktuální stránka: 1 z celkem 57" :)
#9
in reply to:
↑ 8
@
9 years ago
Replying to afercia:
If a slash "/" is appropriate for all languages, then maybe we could also simplify the code. We just need a hidden expanded string as target for
aria-describedby
, something like "Current page: 1 of 57" or "Aktuální stránka: 1 z celkem 57" :)
Just sent a patch (33962.3.patch) after your suggestion. So we can talk over it and check with localized WP versions.
#11
@
9 years ago
- Keywords has-patch added; good-first-bug needs-patch removed
Since it's not clear what we should do here, I've refreshed the patch with a minimal approach, just reducing the links left/right padding.
Wondering if it's worth exploring new visual ideas to convey the information about "pages nn of nn". Would like to see some designers chime in here :) I feel there's an opportunity to solve two issues (visual and accessibility) together. I'm not a designer, what you can see below it's just some quick in-browser editing to try the first (probably bad) idea that came into my (old) mind :) I'm sure designers could do a far better job here :)
About accessibility, we can use ARIA attributes to hide/expand any text, like what was done for the Comment count "bubble".
This ticket was mentioned in Slack in #design by afercia. View the logs.
9 years ago
#15
@
9 years ago
WordPress 4.4 is in Beta 2 now, I'm afraid at this point only a minimal fix is viable, see 33962.4.patch. Maybe worth keeping this ticket open though, in order to explore new ideas? cc @helen
This ticket was mentioned in Slack in #core by afercia. View the logs.
9 years ago
#19
@
9 years ago
Sorry I missed this before, I agree with the fix for 4.4. I'd love to see a more general rethink for nav/filter on small screens, not just with how to make it fit right but also the interactions: #32558.
#21
@
9 years ago
- Keywords commit added; ui-feedback removed
Quickly discussed this ticket at Vienna's Contributor Day with @karmatosed and @hugobaeta and agreed it's an improvement. It was pointed out that there's no apparent reason 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 and agreed these are reasonable considerations but a bit outside the scope of this ticket. Probably something for future iterations and a new ticket.
I think lowering padding of .tablenav-pages .pagination-links a from 9px to -1px will solve the problem. Patch sent.
Update
Patch is unreadable because css file minified. I just changed
to
Update 2
list-tables.css , list-tables-rtl.css files also changed as explained above. Sent as 2nd patch (33962.2.patch)