-
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
Remove the lock icon in list views for content only blocks #61012
Conversation
Size Change: +485 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
7789e0e
to
2a85977
Compare
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
One thing that stands out in the screenshot is that there's still 'Paste Styles' (which means updating styles and so editing something that's not content) and 'Edit as HTML' (also allows for changing things that aren't content) for content locked blocks. I'm guessing those things shouldn't be present. It would leave just 'Copy' and 'Copy styles' in the menu, which makes sense to me. Would be good to hear other people's thoughts. |
I think most of those menu items are a bit confusing, and not very practical given the context. How do you feel about a different menu with help text and a pathway to edit the source document like the mockup in #60834 (comment)? |
Yep, that's mentioned in the PR description that I would work on that in a separate follow-up PR.
If we decide none of the actions in the menu are helpful we can remove them. |
Ah, sorry for missing that. Perhaps it's better to hide the ellipsis menu for now? |
No worries! I opened a draft PR #61127 to explore the design there. I can continue working on hiding the options dropdown here later so that we have different options. |
Just updated this branch to hide the menu. |
Flaky tests detected in 3baf1f1. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8844137534
|
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.
This works well imo :)
As a potential follow-up, when you drag a content only block in list view, should the drag chip utilise the 'not allowed' variant?
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.
LGTM.
I noticed that the thumbnail images and lock icons don't look perfectly positioned, particularly when the block options menu isn't present:
Feels to me like things could line up a little more nicely across rows.
It's an issue in trunk as well, so I don't think it has to be fixed here, and also your follow up PR might reduce the possibility of this happening?
Closed by #61127. |
What?
Part of #60834. Part of #59819.
Remove the lock icon in list views for content only blocks.
This PR also restore the more menu in the list view as I think there are still some actions useful for content only blocks:1. Copy2. Copy styles3. Paste styles4. Edit as HTMLWe can decide separately if any of these aren't needed or anything else should be added to the list though, as well as the more menu in the block toolbar.The description design exploration shown in #60834 (comment) can be implemented as a follow-up of this PR. (PR: #61127)
Why?
See #60834. The lock icon normally indicates non-editable status, which is not true for content only blocks. This PR removes the lock icon.
How?
Add
isContentOnly
check in multiple placesTesting Instructions
Screenshots or screencast
Before:
After: