Open ntsekouras opened 1 day ago
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 props-bot
label.
The following contributors have not linked their GitHub and WordPress.org accounts: @annchichi.
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.
Unlinked contributors: annchichi.
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: rogermattic <magdarogier@git.wordpress.org>
Co-authored-by: oandregal <oandregal@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: mtias <matveb@git.wordpress.org>
Co-authored-by: mcsf <mcsf@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.
Size Change: +407 B (+0.02%)
Total Size: 1.82 MB
Filename | Size | Change |
---|---|---|
build/edit-site/index.min.js |
220 kB | +226 B (+0.1%) |
build/edit-site/posts-rtl.css |
7.54 kB | +42 B (+0.56%) |
build/edit-site/posts.css |
7.54 kB | +42 B (+0.56%) |
build/edit-site/style-rtl.css |
13.4 kB | +48 B (+0.36%) |
build/edit-site/style.css |
13.4 kB | +49 B (+0.37%) |
@ntsekouras the screen recording looks awesome and I think the density settings will be very useful to our users :)
What?
Resolves: https://github.com/WordPress/gutenberg/issues/66312
This PR adds a
density
option totable
layout. I first explored whether an abstraction for thedensity
concept could be a good fit for layouts, but after discussions and better consideration it's better not to rush to such abstraction. The main reason is thedensity
forgrid
for example might confuse users, because common expectations would be a clear setting for controlling the columns(preview size).Having said that, this PR adds a viewConfigOptions to layouts, where layouts can optionally add some specific controls (React components) in a specific place in the
view options
dropdown.By doing that, we decouple the previews grid's
preview size
control from the DataViews core components code and the layout is responsible for providing this control. Additionally these props have been moved insideview.layout
object, since they are specific to each layout.Tasks
density
control and available optionstable
layout perdensity
optionTesting instructions
density
option intable
layoutspreview size
option in `grid layouts (they should behave the same with trunk with an improvement to auto adjust when the viewport changes)Screenshots
https://github.com/user-attachments/assets/5efc90d3-91b8-46ec-a608-b30d7f27593f