-
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
Editor: Fix display of edit template blocks notification #56978
Editor: Fix display of edit template blocks notification #56978
Conversation
Size Change: +2 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
Flaky tests detected in 461b5b1. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7189112781
|
I noticed this was also occurring in the site editor when editing a page with template preview turned off. 2023-12-13.11.34.32.mp4This PR also fixes that 🎉 |
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
The edit template blocks notification doesn't appear when I select multiple blocks in the post/site editor.
All other template-related functions (swap/create/preview) work as expected.
🙇🏻♂️
c0e4b66
to
461b5b1
Compare
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 is testing nicely for me, too, thanks for fixing it up!
✅ In the post editor, the notice is only displayed when the template preview mode is on
✅ In the site editor, it shows by default when editing a page, as it defaults to the template preview (template-locked) mode
I noticed a couple of the e2e tests were failing consistently. I'm 99% sure it's the failures fixed up by #56992, but just to be sure, I've given this a rebase.
LGTM! ✨
This PR will close #56979. Thank you! |
What?
Fixes: #56979
I noticed that when we drag the cursor to have a multi selection in post editor the notification to edit the template is shown. This is because in post editor when we perform the above action, the event target is the post content block which contains the
is-root-container
css class.I believe this notification makes sense only in
template-locked
mode and this PR updates the check to do that.Screen.Recording.2023-12-12.at.2.23.24.PM.mov
Testing Instructions