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

Page editor: Double-click to edit template part #63305

Closed
jameskoster opened this issue Jul 9, 2024 · 6 comments · Fixed by #65024
Closed

Page editor: Double-click to edit template part #63305

jameskoster opened this issue Jul 9, 2024 · 6 comments · Fixed by #65024
Assignees
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

double

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.

@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Jul 9, 2024
@richtabor
Copy link
Member

I think this is a great idea.

@richtabor richtabor removed the Needs Design Feedback Needs general design feedback. label Jul 21, 2024
@richtabor richtabor added this to Polish Jul 21, 2024
@richtabor richtabor moved this to Needs development in Polish Jul 21, 2024
@jameskoster jameskoster moved this to Needs Dev in Design priorities Jul 22, 2024
@jasmussen jasmussen added the Needs Dev Ready for, and needs developer efforts label Aug 27, 2024
@noisysocks
Copy link
Member

noisysocks commented Sep 3, 2024

I constantly find myself double clicking on synced patterns thinking that it will do something 😅

@ramonjd
Copy link
Member

ramonjd commented Sep 3, 2024

Should all double clicks trigger edit? E.g., on a paragraph block inside a footer template part:

2024-09-03.15.24.23.mp4

If "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...

@jorgefilipecosta jorgefilipecosta self-assigned this Sep 3, 2024
@jameskoster
Copy link
Contributor Author

@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 😪

@ramonjd
Copy link
Member

ramonjd commented Sep 3, 2024

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.

Oh, thanks for steering me back on course. I was blinded by excitement 😅 Maybe it's more straight forward than I thought then

@ramonjd
Copy link
Member

ramonjd commented Sep 4, 2024

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 EditTemplateBlocksNotification double click event was still active in the background - I made it so it doesn't activate when a user clicks on a template part.

@jorgefilipecosta jorgefilipecosta removed their assignment Sep 4, 2024
@github-project-automation github-project-automation bot moved this from Needs development to Done in Polish Sep 5, 2024
@github-project-automation github-project-automation bot moved this from 📥 Todo to ✅ Done in WordPress 6.7 Editor Tasks Sep 5, 2024
@github-project-automation github-project-automation bot moved this from Needs Dev to Done in Design priorities Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
Status: Done
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants