-
Notifications
You must be signed in to change notification settings - Fork 4.6k
DataViews: Only apply hover styles when there are bulk actions #73248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sounds good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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