Opened 6 weeks ago
Closed 5 weeks ago
#64787 closed defect (bug) (fixed)
Drop zone for dashboard widgets does not have rounded corners
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | has-screenshots good-first-bug admin-reskin has-patch |
| Focuses: | ui, css | Cc: |
Description
Notices some inconsistency while dragging dashboard widgets, see attached screenshots. The fine dotted line should have the same border radius as the box with the blue background or the thick dotted line.
Attachments (2)
Change History (9)
This ticket was mentioned in PR #11154 on WordPress/wordpress-develop by @niravsherasiya7707.
6 weeks ago
#1
- Keywords has-patch added; needs-patch removed
@stefan.velthuys commented on PR #11154:
6 weeks ago
#2
I can confirm that the fine dotted line now has a border-radius.
However, there is currently no visual indicator when a widget is dragged over empty drop zones, making it impossible to see where the widget will be dropped.
I propose a more unified styling approach in which drop areas are styled identically whenever a widget is being dragged, regardless of whether the area already contains a widget or not.
This would also resolve the issue where users cannot clearly recognize where the widget will be dropped.
I decided against a new PR and invite you @nirav7707 to try it out.
Please find the proposed changes in this diff:
{{{diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
index 99faa0782d..e2a1c87fae 100644
--- a/src/wp-admin/css/common.css
+++ b/src/wp-admin/css/common.css
@@ -2263,7 +2263,7 @@ html.wp-toolbar {
color: #a7aaad;
}
-.sortable-placeholder:not(.empty-container .sortable-placeholder) {
+.sortable-placeholder {
border: 1px dashed #c3c4c7;
border-radius: 8px;
margin-bottom: 20px;
diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css
index e9824c86f9..cc1b4bc5e5 100644
--- a/src/wp-admin/css/dashboard.css
+++ b/src/wp-admin/css/dashboard.css
@@ -68,10 +68,9 @@
}
#dashboard-widgets .postbox-container .empty-container {
- outline: 2px dashed rgb(0, 0, 0, 0.15);
- outline-offset: -2px;
+ outline: 1px dashed #c3c4c7;
border-radius: 8px;
- height: 250px;
+ min-height: 100px;
margin: 4px;
}
@@ -80,10 +79,11 @@
border-radius: 8px;
background: rgb(var(--wp-admin-theme-color--rgb), 0.04);
min-height: 100px;
+ outline: none;
}
.is-dragging-metaboxes #dashboard-widgets .postbox-container .empty-container {
- background: rgb(0, 0, 0, 0.01);
+ background: rgb(var(--wp-admin-theme-color--rgb), 0.04);
}
#dashboard-widgets .postbox-container .empty-container:after {
}}}
@valentingrenier commented on PR #11154:
6 weeks ago
#3
Hi! Just tested this patch and here is my suggestion regarding the targetted drop zone.
## Widget dragged
## Widget in drop zone while being held
The targetted drop zone should be more highlighted when the dragged widget reaches it, for instance with a light blue background, the same as the original drop zone.
#4
@
6 weeks ago
Tested on WordPress trunk.
Reproduced the issue on the Dashboard screen when dragging widgets.
The drop zone area does not have rounded corners, which looks inconsistent with other admin UI elements.
Before Patch:
https://postimg.cc/yJcRstcx
Applied the patch and confirmed that the drop zone now displays rounded corners correctly.
The patch works as expected.
After Patch:
https://postimg.cc/ZCspcrJt
@huzaifaalmesbah commented on PR #11154:
5 weeks ago
#5
#6
@
5 weeks ago
Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11154
Environment
- WordPress: 7.0-beta3-61849-src
- PHP: 8.3.30
- Server: nginx/1.29.5
- Database: mysqli (Server: 8.4.8 / Client: mysqlnd 8.3.30)
- Browser: Chrome 145.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Steps taken
- Head to the admin dashboard, drag one of the widgets to an empty widget container.
- Observe the border-radius of the now-empty widget container of the widget you are dragging while you are dragging it.
- ✅ Patch is solving the problem.
Expected result
- The dotted widget container has a border-radius like the other empty containers.
Additional Notes
- None


Core trac - https://core.trac.wordpress.org/ticket/64787