Closed
Description
Description
ImageSizeControl
(__experimentalImageSizeControl
) was marked as deprecated in #51545.
However, there are two core blocks that use this component:
Just as this API in the image block was replaced by another API in #51545, I think it needs to be replaced by another API in these two blocks as well.
This issue has had its tasks/objectives updated. See this comment.
Step-by-step reproduction instructions
N/A
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
mirka commentedon Aug 7, 2024
I've noticed that when you search for the string
25, 50, 75, 100
, there are also two other blocks that implement a custom version of this outdated control:These should probably also be switched to
DimensionTool
, is that correct?I'm going to go ahead and change the title of this issue so it reflects that
__experimentalImageSizeControl
is not currently deprecated anymore, and that there are other blocks to be switched over as well.t-hamano commentedon Aug 8, 2024
Yes, thanks for the update!
Since the only setting is the width, I don't think it needs to be switched to the
DimensionsPanel
. I think we can simply replace it with the recommended component.Is the recommended component here the

ToggleGroupControl
? If so, I imagine it would look something like this:I think the important bit is that we explicitly add an
Auto
( orNone
) option so that we can reset the width.mirka commentedon Aug 12, 2024
I'm not against switching to ToggleGroupControl, since that's already better than what's in trunk. I was just thinking we might as well switch to a more standard UI pattern that also allows arbitrary values, for example as requested in #62247.
8 remaining items