#58114 closed defect (bug) (fixed)
Dashboard: set ”Activity”-widget layout to columns
Reported by: | sumitsingh | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch has-screenshots commit |
Focuses: | ui, accessibility, css, administration | Cc: |
Description
Hi,
I am thinking can we do 2 columns on the Activity meta box? similar to Site Health Status meta box. For more information see mentioned screenshot.
Below is CSS for a solution as per my through.
div#dashboard_activity #published-posts li { display: grid; grid-template-columns: 1fr 2fr; grid-auto-rows: minmax(25px,auto); column-gap: 10px; }
Attachments (7)
Change History (26)
#2
@
20 months ago
- Keywords has-patch added
Thanks, @dhrumilk The Patch 58114.diff looks good to me.
#3
@
20 months ago
- Keywords needs-testing needs-screenshots added; has-screenshots removed
What does the patch look like on other locales than us_EN? Can the date/time format become longer? How does it look like on a RTL-locale?
#4
@
20 months ago
- Keywords has-screenshots added; needs-testing needs-screenshots removed
- Owner set to audrasjb
- Status changed from new to accepted
- Version trunk deleted
This looks good to me.
There is a small WPCS issue (indentation) in the proposed patch, but this can be fixed directly when committing the changeset.
#6
@
20 months ago
- Focuses css added
- Summary changed from Small UI issue on dashboard page to Dashboard: set ”Activity”-widget layout to columns
#7
@
20 months ago
It still looks pretty good to me, but maybe we could reduce a bit the spacing between the two cols? Any thought?
#8
follow-up:
↓ 9
@
20 months ago
Looking at the css code, the span
-tag that holds date time has a min-width
of 150px
defined, and a margin-right
. This can be removed, and clamp(150px, calc(1vw + 150px), 200px) auto;
or similar can be added to the parent li
-element. This reduces the gap.
#9
in reply to:
↑ 8
@
20 months ago
@kebbet I agree with what you suggested clamp things.
Replying to kebbet:
Looking at the css code, the
span
-tag that holds date time has amin-width
of150px
defined, and amargin-right
. This can be removed, andclamp(150px, calc(1vw + 150px), 200px) auto;
or similar can be added to the parentli
-element. This reduces the gap.
#10
@
20 months ago
- Keywords needs-refresh added
Testing with future dates and passed dates gives long strings in the time/date column.
- With the solution in core, the post title is pushed a bit to the side (right/left depending on ltr/rtl).
- With suggested solution the time/date column line breaks.
By adjusting the width to 160px I can not get the date/time to line break, but it is possible if locales chooses to use longer date formats than shortend ones (en_US uses Apr. and Mar.)
- Are we ok with line breaks in date/time column?
I'll submit a PR soon with an updated solution and some minor design tweaks.
This ticket was mentioned in PR #4319 on WordPress/wordpress-develop by @kebbet.
20 months ago
#11
- Keywords needs-refresh removed
#12
@
19 months ago
Hi,
Test report for - https://github.com/WordPress/wordpress-develop/pull/4319
Test Environment:
WordPress - v6.2.2
OS: Mac
Browser: Chrome
Expected Result: Recent activity layout column should be visible properly ☑️
Screenshots:
Before:
LTR: https://prnt.sc/4hbM9mMwdxxJ
RTL: https://prnt.sc/2jIoG4gnkCEd
After:
LTR: https://prnt.sc/rKgaDQD_hevs
RTL: https://prnt.sc/a6I58PPlvz7b
So the patch is working as expected.
Thanks!
@audrasjb commented on PR #4319:
19 months ago
#13
Hey @kebbet it looks like there is something wrong in your fourth PR: we seems to have even/odd background on filters, too… 🤔
@audrasjb commented on PR #4319:
19 months ago
#15
Ok thanks for the confirmation! I'll have a look then :)
@audrasjb commented on PR #4319:
19 months ago
#16
#17
@
19 months ago
- Keywords commit added
While the odd/even background color is not used anywhere else on the dashboard widgets, I think it's fine to visually separate each line.
The patch looks good to me and was succesfuly tested on RTL and small screens. Let's ship it.
@audrasjb commented on PR #4319:
19 months ago
#19
Committed in https://core.trac.wordpress.org/changeset/55889
Currently looking like this