-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Replace ImageSizeControl component with DimensionsTool component #53831
base: trunk
Are you sure you want to change the base?
Replace ImageSizeControl component with DimensionsTool component #53831
Conversation
…uded ToolsPanel and ToolsPanelItem as they seem to be required
…l and included ToolsPanel and ToolsPanelItem components
… get more fine graned control of the output
…th-aspect-ratio-tool
@ajitbohra @ryanwelcher @juanruitina @fabiankaegy @ndiego Gentle nudge |
@n2erjo00 Could you please rebase this PR to resolve conflicts? |
@aristath Trunk merged |
"featuredImageScale": { | ||
"type": "string" | ||
}, | ||
"featuredImageAspectRation": { |
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.
Is this a typo? Did you mean featuredImageAspectRatio?
I am not sure this control is going to work for the media & text block, because it has a different type of media width setting which is meant to work for both images and video. The settings work better for the latest posts block. |
Thanks for the PR, @n2erjo00! This PR not only replaces deprecated components, but also adds new attributes such as width, height, ratio, and scale. Merging this PR would require a broader discussion, especially regarding newly added features. We're also updating the Personally, I think we can focus on replacing deprecated components first and consider adding new features later. For example, taking the Media and Text block as an example, this means dividing them into the smallest PRs as follows:
Even if this PR is closed, the code will still be available for reference by those working on these tasks. ccing @ajlende - Because I think you are very familiar with these components. |
What?
This PR replaces to-be-deprecated
__experimentalImageSizeControl
component withDimensionsTool
component inside the media-text and latest-posts block.Why?
Issue was introduced by ticket #52223 .
__experimentalImageSizeControl
component is marked to be deprecated in the some future, makes sense to get rid of it.How?
Basically I opened up image block and started copy-pasting code from there.
Biggest curve ball was the requirement to use new components
<ToolsPanel>
and<ToolsPanelItem>
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
First screenshot is taken while latest-post block is active. Second screenshot is taken while latest-posts block is active and after clicking the three dots next to "Featured image" label. Last one is same as second screenshot but taken while media-text is active and instead label being "Featured image" it now was "Setting".