#31685 closed defect (bug) (fixed)
Better responsive styling for my-sites.php
Reported by: | boonebgorges | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch |
Focuses: | ui, multisite | Cc: |
Description
my-sites.php switches to a multi-column layout when you have lots of sites: 2 columns when you have 10+, 4 columns when you have 20+. These layouts (especially the 4-column one) are nearly unusable on small screens. See my-sites-before.png. We should go to a single column on narrow viewports.
Attachments (17)
Change History (43)
#2
follow-up:
↓ 3
@
10 years ago
I think this would be a great time to make this not a table element anymore. It is a list of things, but it's not really tabular data.
#3
in reply to:
↑ 2
@
10 years ago
- Keywords needs-patch added; has-patch removed
Replying to helen:
I think this would be a great time to make this not a table element anymore. It is a list of things, but it's not really tabular data.
Thanks for making the job harder :) (I agree though.) I will work on a patch.
#4
@
10 years ago
- Keywords has-patch added; needs-patch removed
31685.diff converts the list to a <ul>
. I added JES (Just Enough Styling) to make it look just like the single-column table treatment in my-sites-after.png. It's not really possible to keep a dynamic grid and to do zebra striping in PHP+CSS, and it seems like a lot of wasted effort to make it work with JS, so I've dropped the grid view altogether: you always see a full-width single column. I thought about making each row take up a bit less space, but there are hooks in there - especially 'myblogs_options' - that I'm sure people are using to output lots of stuff.
The more I look at My Sites, the sadder I get - it could probably use a significant rethink to make it something much more beautiful and useful. That said, it would be really nice to fix the mobile problem in the short term.
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
This ticket was mentioned in Slack in #core by jeremyfelt. View the logs.
10 years ago
This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.
10 years ago
This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.
9 years ago
#11
@
9 years ago
Working from boonebgorges patch I added some more styling to create the zebra striping and keep the original layout of the table while making it responsive from 1 to 5 columns.
Agreed that the page could use some love in the long term.
#13
@
9 years ago
Thanks, tryon! This is a nice improvement. I'm going to remove the background color of the .my-sites
div, so that there's no empty white space when a row is not completely filled. See 31685.4.diff.
It's worth noting that your patch (and my patch) means that grid mode will kick in even for a small number of sites - previously it was only for 10+ (2 cols) or 20+ (4 cols). I don't think this is a big loss, but I did want to note it.
The patch is vastly better than what we currently have, so let's go with it.
#16
@
9 years ago
- Keywords needs-patch added; needs-screenshots removed
- Resolution fixed deleted
- Status changed from closed to reopened
This ticket was mentioned in Slack in #core by ocean90. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by boren. View the logs.
9 years ago
#19
@
9 years ago
31685.5.diff introduces the following changes:
- Ensures that we don't get weird float issues (by applying
clear
where appropriate) - Sets a
min-height
on theli
elements when in a grid formation. This results in a bit of extra whitespace for small titles, but it's the only way to ensure that rows are even without tables (or without redesigning the whole page). Very, very long site titles can still overflow, in which case a small gap is introduced between rows. See 31685-fullwidth.png. IMO, this is acceptable for an edge case. - Tweaked the padding at various widths to make sure nothing looks cramped against the edges.
This ticket was mentioned in Slack in #core by boone. View the logs.
9 years ago
#21
follow-up:
↓ 22
@
9 years ago
- Focuses ui added; administration removed
- Keywords has-patch added; needs-patch removed
@boonebgorges Looks good. I would go with 120 or 130px for min-width.
Can we get rid of the border around the list, see 31685.5.png?
#22
in reply to:
↑ 21
@
9 years ago
Replying to ocean90:
@boonebgorges Looks good. I would go with 120 or 130px for min-width.
Can we get rid of the border around the list, see 31685.5.png?
Assuming you mean min-height
. Agreed.
Yup, let's lose the border. I think this is a remnant of the original table implementation.
#24
follow-up:
↓ 25
@
9 years ago
You know what might make this cool later (not just in responsive), is site icons. :)
#25
in reply to:
↑ 24
@
9 years ago
Replying to helen:
You know what might make this cool later (not just in responsive), is site icons. :)
Something like capture.png?
31685.diff converts to a one-column layout, and switches the zebra-striping from the
tr
to thetd
elements as appropriate. This leaves kinda odd markup (there are still 4td
s in eachtr
), but IMO it's a better solution than, say, building different markup whenwp_is_mobile()
.