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

Template level blocks can be unlocked and moved when template preview is active #67082

Open
fabiankaegy opened this issue Nov 18, 2024 · 6 comments
Assignees
Labels
Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release [Feature] Template Editing Mode Related to the template editor available in the Block Editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@fabiankaegy
Copy link
Member

In WordPress 6.7 there is a regression in the handling of Blocks that are part of the template but that remain editable.

For example the post title or the post featured image blocks remain editable when they are part of the template when the "Show Template" option is enabled in the editor.

In WordPress 6.7 these blocks now suddenly show a lock icon in their block toolbar. Clicking that allows editors to unlock and then move them.

This moving doesn't get persisted luckily. But it still created a broken editorial experience for users.

CleanShot.2024-11-18.at.13.56.18.mp4
@fabiankaegy fabiankaegy added [Feature] Template Editing Mode Related to the template editor available in the Block Editor [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release labels Nov 18, 2024
@fabiankaegy
Copy link
Member Author

Looking further into this it appears this has already been fixed in Gutenberg. So we need to find the PR and add that to the backport list

Image

@youknowriad
Copy link
Contributor

Hey folks, this seems to be a 6.7 only bug, I can't reproduce on Gutenberg trunk. I think it might be related to the block toolbar updates that were done specifically on that branch. Any ideas @getdave @ellatrix

@getdave
Copy link
Contributor

getdave commented Nov 19, 2024

Nothing springs to mind. There was a lot of divergence between trunk and wp/6.7 during the Beta/RC period as trunk continued to evolve in/around Zoom Out and changes to "Write mode" so it would have been easy for something to have been missed.

Also cc @cbravobernal who is leading 6.7.X releases from Editor side.

@getdave
Copy link
Contributor

getdave commented Nov 19, 2024

I noticed isDefaultEditingMode seems to be missing from the packages/block-editor/src/components/block-toolbar/index.js file in wp/6.7 but it is there in trunk.

isDefaultEditingMode &&
showLockButtons && (
<BlockLockToolbar
clientId={ blockClientId }
/>

I tried adding it in and it seemed to fix things.

Haven't had much time to test but here is a PR

@t-hamano
Copy link
Contributor

#66200, which was manually backported to wp/6.7, appears to be related.

Here, both isDefaultEditingMode and isContentOnlyEditingMode were removed. The removal of isContentOnlyEditingMode seems to have been intentional, but the removal of isDefaultEditingMode might not have been.

@getdave
Copy link
Contributor

getdave commented Nov 22, 2024

So can we tweak #67121 to resolve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release [Feature] Template Editing Mode Related to the template editor available in the Block Editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
Development

Successfully merging a pull request may close this issue.

4 participants