-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Make DataViews table checkbox permanently visible #73245
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
Make DataViews table checkbox permanently visible #73245
Conversation
|
Size Change: -173 B (-0.01%) Total Size: 2.49 MB
ℹ️ View Unchanged
|
t-hamano
left a comment
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.
LGTM!
Just to be sure, we're not planning on changing the behavior of checkboxes in grid layout, right? If we need to make similar changes to grid layout, we'll need to update this here:
gutenberg/packages/dataviews/src/dataviews-layouts/grid/style.scss
Lines 125 to 141 in 07c8f83
| .dataviews-view-grid__card .dataviews-selection-checkbox { | |
| position: absolute; | |
| top: -9999em; | |
| left: $grid-unit-10; | |
| z-index: z-index(".dataviews-view-grid__card .dataviews-selection-checkbox"); | |
| opacity: 0; | |
| @media not (prefers-reduced-motion) { | |
| transition: opacity 0.1s linear; | |
| } | |
| @media (hover: none) { | |
| // Show checkboxes on devices that do not support hover. | |
| opacity: 1; | |
| top: $grid-unit-10; | |
| } | |
| } |
|
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: @madebynoam, @JanaMW27. 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. |
|
I wouldn't object to changing grid layout as well, but I think the issue is less pronounced there because grid layout is less suited to bulk actions compared to table layout. Worth exploring in a separate PR I reckon. |
|
|
@madebynoam ah I could have worded that better. The logic to include checkboxes based on the presence of bulk actions already exists. This PR just ensures they're always visible. |
Got it. Thank you, @jameskoster! |
|
I'm going to merge this. There's plenty of time to test during the 7.0 cycle and we can easily revert if necessary. |
Closes #59175
What?
Make checkboxes in DataViews table layout permanently visible (assuming bulk actions are available)
Why?
See #59175.
Testing Instructions
npm run storybook.Before
After