DataViews: Only apply hover styles when there are bulk actions#73248
DataViews: Only apply hover styles when there are bulk actions#73248jameskoster merged 3 commits intotrunkfrom
Conversation
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @cre8tivediva. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
|
Size Change: +58 B (0%) Total Size: 2.42 MB
ℹ️ View Unchanged
|
| } | ||
|
|
||
| // Hover styles only apply when bulk actions are available | ||
| &.has-bulk-actions { |
There was a problem hiding this comment.
What if we remove the hover styles entirely, and only select the item when you actually click the checkbox?
There was a problem hiding this comment.
I think that's worth exploring, but probably separately. It might be considered a regression given the reduction in target size, especially as checkboxes are already too small. Some relevant discussion in:
There was a problem hiding this comment.
Ok, sounds good to me.
There was a problem hiding this comment.
I do think it's not a regression though, it makes things clearer:
- checkboxes are for selecting the item.
- clicking the main "title field" is for the main action of the table.
- the rest is just a regular html table.
closes #65009
What?
As title :)
Why?
The hover styles make the row appear interactive which can be misleading.
How?
hasBulkActionsis true, the table gets thehas-bulk-actions class.has-bulk-actionsclass.Testing Instructions
npm run storybook