Widget dashboard: skip tile hover elevation while resizing#78234
Conversation
Expose data-wp-dashboard-grid-resizing on DashboardGrid during resize gestures so consumers can avoid hover-driven chrome when the pointer stays over the tile. Widget tiles keep resting shadow until resize ends. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Size Change: 0 B Total Size: 7.95 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 5b4a657. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25795407077
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Allow the CSS Modules :global pseudo-class in *.module.css via selector-pseudo-class-no-unknown ignore list. Format :global([data-wp-dashboard-grid-resizing]) selectors without spaces inside parentheses to satisfy stylistic rules. Co-authored-by: Cursor <cursoragent@cursor.com>
What
data-wp-dashboard-grid-resizingon theDashboardGridroot while any tile resize is active.--wpds-elevation-mdwhen that attribute is present (tiles stay at--wpds-elevation-xs).packages/grid/CHANGELOG.md.Part of #77626 #77616
Why
While shrinking a widget, the pointer often stays over the tile body, so
:hoverstays true and the stronger shadow keeps applying. That reads as flicker or visual noise and fights the resize gesture. Drag/reorder is unchanged; only resize needed a signal.How
DashboardGridalready tracksisResizing; the grid root now mirrors that with a stabledata-*hook for styling.widgets.module.cssadds a higher-specificity override under:global([data-wp-dashboard-grid-resizing])so resting elevation wins over.tileEditMode:hover/:focus-visiblefor the duration of the gesture..stylelintrc.js: For *.module.{css,scss} only, selector-pseudo-class-no-unknown now ignores the global pseudo-class, matching the existing module-file exception for composes. That keeps :global usable in module styles without file-level disables whenever we need to target unscoped markup (e.g. the grid root’s data-wp-dashboard-grid-resizing attribute).Testing instructions