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

Improving the inline template part editing flow #43608

Open
jameskoster opened this issue Aug 25, 2022 · 10 comments
Open

Improving the inline template part editing flow #43608

jameskoster opened this issue Aug 25, 2022 · 10 comments
Labels
[Block] Template Part Affects the Template Parts Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Aug 25, 2022

The click-through overlay we added to the template part selection flow works well, but there are a couple of outstanding issues when it comes to editing that would be nice to address:

  1. We never really solved how to indicate the template part boundaries once you begin editing the blocks within
  2. The selection action feels a bit clumsy, because oftentimes immediately after selection you see outlines of child blocks appear... It's a bit disorienting (see the double-border in the gif below):

border

It would be interesting to try an iteration where clicking a template part selects it, but a further action is required to engage editing. Once edit mode is engaged we can use the 'spotlight' effect to dim blocks outside the template part, clearly indicating its boundary. Here's how that would look:

template.part.mp4

Note that after selecting the template part, subsequent clicks within its boundaries do nothing. Only after clicking the 'Edit' button in the toolbar am I able to interact with the child blocks.

Another benefit of this approach is that the added friction can help indicate that this block is different to others in a meaningful way. We may even consider it a part of #43598.

To connect a dot, we're currently discussing a similar interaction as a part of #43037 (comment), so there may be precedent to apply a similar effect in other areas.

cc @WordPress/gutenberg-design

@jameskoster jameskoster added Needs Design Feedback Needs general design feedback. [Block] Template Part Affects the Template Parts Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Aug 25, 2022
@jasmussen
Copy link
Contributor

Looks good!

My first instinct was: if there's an extra Edit button, why not just go to full isolated mode? But this makes sense:

To connect a dot, we're currently discussing a similar interaction as a part of #43037 (comment), so there may be precedent to apply a similar effect in other areas.

When inserting a pattern as a section as discussed there, you'll want to see it in context, not edit it purely in isolation mode. So in that sense, the spotlight (or "scrim everything else") makes sense to me 👍 — we mainly want to avoid introducing too many new elements in terms of borders or behaviors.

@jameskoster
Copy link
Contributor Author

When inserting a pattern as a section as discussed there, you'll want to see it in context, not edit it purely in isolation mode.

Yeah this is the key point. To be clear I think we probably need to offer both – inline editing where you have context, and isolated view where you have absolute focus.

I suspect the inline version would feel more natural as the primary flow in this context. Access to isolated editing could perhaps live in the more tools menu.

@jasmussen
Copy link
Contributor

Right. Just want to visually distinguish them, and generally reduce. We tried dotted borders in the past, that wasn't quite as succesful.

@mtias
Copy link
Member

mtias commented Sep 11, 2022

I'd also like to try some overlay text that says the name or type of the template part.

@mtias
Copy link
Member

mtias commented Sep 11, 2022

@pablohoneyhoney this might be similar to what we discussed for the navigation block.

@jameskoster
Copy link
Contributor Author

I'd also like to try some overlay text that says the name or type of the template part.

Do you mean on hover?

@mtias
Copy link
Member

mtias commented Sep 12, 2022

Yes

@jameskoster
Copy link
Contributor Author

I think we explored before having something like a tag attached to the overlay. Since template parts can be quite small, it may have to appear outside.

Screenshot 2022-09-12 at 12 35 08

@mtias mtias mentioned this issue Oct 7, 2022
57 tasks
@jameskoster jameskoster added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Oct 21, 2022
@jameskoster
Copy link
Contributor Author

I think this is ready to try from a design perspective. Adding 'Needs Dev'.

@youknowriad youknowriad self-assigned this Nov 1, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 1, 2022
@priethor priethor removed the Needs Dev Ready for, and needs developer efforts label Nov 2, 2022
@annezazu annezazu added the Needs Dev Ready for, and needs developer efforts label Nov 7, 2022
@annezazu
Copy link
Contributor

annezazu commented Nov 7, 2022

Added needs dev label back since dev work is underway and hasn't yet been completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Template Part Affects the Template Parts Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
Status: Needs dev
Status: 💻 Needs development
Status: Needs development
Development

Successfully merging a pull request may close this issue.

7 participants