-
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
Template/Page Editing UX: Try highlighting what's editable #57786
Conversation
…light what's editable using CSS
Size Change: +427 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
This is really rough, but I want to see if @youknowriad thinks it's a dumb idea to add a new block ( |
I think the main problem with "adding virtual blocks" is that you'll end up with markup that doesn't match the frontend breaking the visual representation in subtle ways (things like layout, first/last CSS selectors... and others might break as a result). |
Jfyi (or for inspiration),
It's not optimized for locked blocks, but if they have a css class I could imagine just not showing the border then. Screen.Recording.2024-01-14.at.11.52.06.mp4 |
Trying a different approach 😀 |
What?
First attempt at implementing Part 1 of #55025.
Why?
See #55025.
How?
When editing a page in the site editor in
post-only
mode, we wrap everything with a new Template block. This is an internal (supports.inserter: false
) block that is similar to Template Part and renders the specified template. By wrapping everything in a block, we can achieve the desired effect shown in Part 1 of #55025 where clicking on a block that is part of the template results in a block toolbar appearing with an Edit button.Testing Instructions
Screenshots or screencast
Kapture.2024-01-12.at.15.23.57.mp4