-
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
Page editor: Double-click to edit template part #63305
Comments
I think this is a great idea. |
I constantly find myself double clicking on synced patterns thinking that it will do something 😅 |
Should all double clicks trigger edit? E.g., on a paragraph block inside a footer template part: 2024-09-03.15.24.23.mp4If "no", I'm wondering how far up the chain the double-click should propagate 🤔 maybe just the template part wrapper and its first inner block. A group block, for example, that wraps inner content in the footer (and has the same dimensions) will always capture the double click, but I suppose we could check the event target and dispatch a new Event to ensure the event is always treated as if it occurred on the parent template part. I dunno, I'm just rambling... |
@ramonjd I think you're editing a template. In that scenario template part inner blocks can be directly manipulated. This issue is about the Page editor specifically, where template parts can be selected, but their child blocks are inaccessible until you click 'Edit' in the toolbar. Personally I don't find the difference in behavior to be very helpful, but that's a separate issue 😪 |
Oh, thanks for steering me back on course. I was blinded by excitement 😅 Maybe it's more straight forward than I thought then |
Okay, update 😄 I had a bit of time to try something: Question: should the double click be restricted to the site editor? My PR enables it when editing pages in the site editor, but also when editing post/pages with the template shown in the post editor. Seemed logical to leave it that way to me. Also I noticed the |
When page editing with the template visible, if you double-click on a template block a prompt appears directing you to the template editor.
We could try doing something similar with template parts. To edit the header or footer currently you have to select the block, then click the 'Edit' link in the toolbar. In addition we could try listening for double-clicks, and send the user to edit the template part in focus mode.
The text was updated successfully, but these errors were encountered: