-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Image Block: MediaPlaceholder
/ MediaUpload
component doesn't addapt to small sizes
#54867
Comments
MediaPlaceholder
/ MediaUpload
component doesn't addapt to small sizesMediaPlaceholder
/ MediaUpload
component doesn't addapt to small sizes
I wonder if it's be more useful as a button to open the Media Library when it's under a certain height/width. |
Just ran into this today with 6.5.3 and I agree that this is rough. Adding this to the Polish board as it would be good to iterate here. |
Based on conversation, feedback, and design iterations on a related issue (#64288), I went ahead and updated this issue with a fresh design and shuffled the labels around. |
Actually based on work in #64320 (kudos @vipul0425), one thing we can do is add only a single text-item to the block toolbar in its placeholder state "Choose image", rather than have separate items, since the dropdown it would open is needed regardless for extensibility. CC: @WordPress/gutenberg-design for input. |
Updated to reflect the work in progress in #64320. |
Description
When an image block for example is used with a fixed height and width in a Pattern where it doesn't have an image selected yet, the image will render the
MediaPlaceholder
But since an image can be really small the
MediaPlaceholder
should ideally adapt to the small size and display an alternate layout.You can see the overflowing issue in the screencast I attached below
Step-by-step reproduction instructions
Code sample
Screenshots, screen recording, code snippet
CleanShot.2023-09-27.at.14.39.53.mp4
Related issue: #64288.
Suggestion
Apply a minimal version of
Placeholder
that is shown when the block is narrow. Already in place are CSS classesis-medium
andis-small
, which can be used to change the appearance based on context.Mockup:
Details:
Issue updated Aug 7. Figma.
The text was updated successfully, but these errors were encountered: