Open t-hamano opened 6 days 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.
If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
Co-authored-by: up1512001 <up1512001@git.wordpress.org>
Co-authored-by: Drivingralle <drivingralle@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: +157 B (+0.01%)
Total Size: 1.82 MB
Filename | Size | Change |
---|---|---|
build/block-editor/index.min.js |
255 kB | +59 B (+0.02%) |
build/block-library/index.min.js |
221 kB | +96 B (+0.04%) |
build/block-library/style-rtl.css |
15 kB | +1 B (+0.01%) |
build/block-library/style.css |
15 kB | +1 B (+0.01%) |
Alternative to #66946 Closes #60911
What?
This PR adds
dimensions.aspectRatio
support to the video block.Why?
In #66946, we are trying to add
aspectRatio
via theDimensionsTool
component, i.e. as a custom block attribute.However, the
DimensionsTool
component is intended to be used in aToolsPanel
, so this requires refactoring of theInspectorControls
.Furthermore, we need to ensure that it is possible to migrate to block support in the future. In that case, I think it would be better to explore whether it is possible to implement it as block support from the start.
How?
To ensure that styles are applied correctly from both the global styles and block instance, skip serialization and apply the styles to the
video
element inside the block.Testing Instructions
aspectRatio
to the Video block via theme.json:Screenshots or screencast
https://github.com/user-attachments/assets/83b620ae-ba78-43df-b03b-beba39f4e340