Skip to content
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

Placeholders look broken when block is narrow, e.g. when used in a grid #64288

Open
noisysocks opened this issue Aug 6, 2024 · 17 comments
Open
Labels
[Block] Image Affects the Image Block [Feature] Layout Layout block support, its UI controls, and style output. Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.

Comments

@noisysocks
Copy link
Member

noisysocks commented Aug 6, 2024

Blocks with placeholder states do not scale to very narrow containers. Example here of an Image placeholder in a narrow grid layout:

image

There's a separate issue for updating just the Image block has been updated (#54867), but the problem is present for every block that uses the Placeholder component. The same solution can be applied:

i2 Generic placeholders

Key here is leaning into a few principles:

  • The placeholder content (title, text, buttons) are available for large and medium contexts.
  • In small contexts, we rely on the block toolbar for having a single primary CTA. This affords a text label that will not be cropped.
  • In that same small context, either the gray unselected placeholder material is used, or the entire spot is a plus button that opens the quick inserter (as it is in empty columns or groups, for example).

Figma.

@noisysocks noisysocks added [Type] Bug An existing feature does not function as intended Needs Design Needs design efforts. [Block] Image Affects the Image Block [Feature] Layout Layout block support, its UI controls, and style output. labels Aug 6, 2024
@talldan

This comment was marked as resolved.

@jasmussen

This comment was marked as outdated.

@jasmussen jasmussen added Needs Design Feedback Needs general design feedback. and removed Needs Design Needs design efforts. labels Aug 6, 2024
@jasmussen jasmussen moved this to Now in Design priorities Aug 6, 2024
@jasmussen

This comment was marked as outdated.

@jasmussen

This comment was marked as outdated.

@jameskoster

This comment was marked as resolved.

@jasmussen

This comment was marked as outdated.

@jasmussen

This comment was marked as outdated.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Aug 7, 2024
@jasmussen

This comment was marked as outdated.

@vipul0425

This comment was marked as resolved.

@jasmussen

This comment was marked as outdated.

@jasmussen

This comment was marked as resolved.

@jasmussen jasmussen moved this from Now to Needs Dev in Design priorities Aug 22, 2024
@jasmussen jasmussen added Needs Dev Ready for, and needs developer efforts and removed [Status] In Progress Tracking issues with work in progress Needs Design Feedback Needs general design feedback. labels Aug 22, 2024
@jasmussen
Copy link
Contributor

Based on the feedback on this thread, I've gone ahead and updated the issue and shuffled the labels! This still needs a dev, although #54867 is underway (and please help that PR land as well), that will only fix the issue for the Image block. It needs to be solved for the general component as well.

@t-hamano
Copy link
Contributor

Update: #54867 added block controls to the Image block to always add media, and in narrow containers, the Image block placeholder always shows with the illustration. A similar approach could be applied to other blocks.

image

However, there is an issue with slight flashing when inserting blocks in narrow containers:

366028943-3cb45d00-95de-4f89-a397-6ee6da7ae1be.mp4

We've tried to solve this problem in #54867, but haven't found an ideal solution yet.

I'd love your feedback on how to fix this.

@ndiego
Copy link
Member

ndiego commented Oct 7, 2024

@t-hamano @jasmussen now that #54867 has been merged, can this issue be removed from the 6.7 project board, or punted to 6.8. I know not all of the placeholders have been addressed.

@jasmussen
Copy link
Contributor

Yes, can definitely be removed. Thanks!

@t-hamano
Copy link
Contributor

t-hamano commented Oct 7, 2024

I agree. This issue could be considered an enhancement and it can be punted since it contains so many tasks.

@ndiego ndiego added [Type] Enhancement A suggestion for improvement. and removed [Type] Bug An existing feature does not function as intended labels Oct 7, 2024
@jasmussen
Copy link
Contributor

Noting I opened #66563, which is related to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] Layout Layout block support, its UI controls, and style output. Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
Status: Needs Dev
Development

No branches or pull requests

7 participants