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

ContentOnly: Improve the image block toolbar controls within contentOnly locking #64727

Closed
richtabor opened this issue Aug 22, 2024 · 9 comments · Fixed by #64849
Closed

ContentOnly: Improve the image block toolbar controls within contentOnly locking #64727

richtabor opened this issue Aug 22, 2024 · 9 comments · Fixed by #64849
Labels
[Block] Image Affects the Image Block [Feature] Block Locking The API allowing for the ability to lock/unlock blocks [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

The current implementation of image blocks with contentOnly locking needs a bit of attention.

Here's what I'm proposing:

  1. Remove "Title" from the toolbar, unless the title attribute is present on the block already. Otherwise it's confusing. It's an advanced item in the Inspector already anyhow.
  2. Add a divider between "Replace" and "Alt" to better distinguish these two.
  3. Remove the cropping mechanism. Perhaps if it gets better in the future we can reintroduce, but for now it's clunky and does not work well in the contentOnly implementation where you can't really resize the image after cropping.
  4. Update "Alt" to "Add description" to make it much clearer what you can do.

Current

CleanShot 2024-08-22 at 15 29 48

Proposed

CleanShot 2024-08-22 at 15 28 40

@richtabor richtabor added [Type] Enhancement A suggestion for improvement. [Block] Image Affects the Image Block [Feature] Block Locking The API allowing for the ability to lock/unlock blocks labels Aug 22, 2024
@talldan
Copy link
Contributor

talldan commented Aug 22, 2024

There's also a PR here that could be an option to revive - WIP: Try surfacing content inspector controls for contentOnly inner blocks

It allows for alt and other controls to be moved back to the block inspector.

@jeryj
Copy link
Contributor

jeryj commented Aug 26, 2024

Update "Alt" to "Add description" to make it much clearer what you can do.

We use "Alternative Text" in other areas, and in the Media Library have both Alternative Text and Description fields. I think Alt text and description are separate things (while confusing, I don't know what description is used for in the media library). So, probably best to rely on Alt or alternative text. What @talldan said about surfacing inspector controls for contentOnly blocks is probably best overall though.

@richtabor
Copy link
Member Author

There's also a PR here that could be an option to revive - #60412 (comment)

It allows for alt and other controls to be moved back to the block inspector.

Maybe—it's an interesting exploration. But it kinda takes the simplicity out of contentOnly mode, as you'd have another navigation tree to take note of.

@richtabor
Copy link
Member Author

We use "Alternative Text" in other areas, and in the Media Library have both Alternative Text and Description fields.

Yea, I'm curious if using "Description" in lieu of "Alternative text" would result in more people understanding what it is, how to use it, and what to do with it (not just here in this control). "Add alternative text" is likely not as understandable as "Add description" for the majority of users.

@richtabor richtabor changed the title Improve the image block toolbar controls within contentOnly locking ContentOnly: Improve the image block toolbar controls within contentOnly locking Aug 27, 2024
@richtabor
Copy link
Member Author

"Add alternative text" is likely not as understandable as "Add description" for the majority of users.

I'm cool with making it "Add alternative text" for now to get this unblocked though.

@jeryj
Copy link
Contributor

jeryj commented Aug 27, 2024

Yea, I'm curious if using "Description" in lieu of "Alternative text" would result in more people understanding what it is,

I think you're spot on that this is an opportunity for us to educate the user though. I think titling it Alt Text and then explaining that it's a description.

Screenshot of alt text field in block editor settings sidebar

This is what we already do in the sidebar. I checked the description link, and it goes to this technical document. I wish we linked to a resource that was simpler and straightforward. I imagine no one reads this.

@jeryj
Copy link
Contributor

jeryj commented Aug 27, 2024

I'm cool with making it "Add alternative text" for now to get this unblocked though.

Do you want it to just be "Alternative text"? Otherwise we'll need to check if its empty ("Add alternative text ") or has text ("Edit alternative text").

@jeryj
Copy link
Contributor

jeryj commented Aug 27, 2024

If the above four PRs are merged, this issue can get closed.

@richtabor
Copy link
Member Author

This is what we already do in the sidebar. I checked the description link, and it goes to this technical document. I wish we linked to a resource that was simpler and straightforward. I imagine no one reads this.

Yea, it's not great.

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] Block Locking The API allowing for the ability to lock/unlock blocks [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants