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 parts should follow the wp:pattern interaction model #65698

Open
mtias opened this issue Sep 27, 2024 · 6 comments
Open

Template parts should follow the wp:pattern interaction model #65698

mtias opened this issue Sep 27, 2024 · 6 comments
Labels
[Block] Pattern Affects the Patterns Block [Block] Template Part Affects the Template Parts Block

Comments

@mtias
Copy link
Member

mtias commented Sep 27, 2024

Now that the concepts around #48458 are more solid, we need to ensure interactions are consistent between inserted template parts, synced patterns, and top level groups through the various edit modes.

  • On zoomed-out, controls such as "shuffle" should be present, even if "header" and "footer" are anchored on a template without movers.
  • On content-only mode, they should be selectable and expose their child blocks as content.
  • If content-only is editable, synced patterns and template parts should always provide the ability to modify content.
  • They should all expose hooked blocks as toggleable features: Expose "block hooks" at the section level #65676.
@mtias mtias added [Block] Template Part Affects the Template Parts Block [Block] Pattern Affects the Patterns Block labels Sep 27, 2024
@fabiankaegy
Copy link
Member

fabiankaegy commented Sep 27, 2024

If content-only is editable, synced patterns and template parts should always provide the ability to modify content.

Not sure how I feel about this one. I thought we learned through all the confusion from users that directly allowing editing of synced patterns causes confusion because it's not clear that your change affect the rest of the site? 🤔

@mtias
Copy link
Member Author

mtias commented Sep 27, 2024

Yeah, it'd be something we need to clarify on the UI. There's a lot of permutation between partially synced patterns and content-only UI that we need to get right. For fully synced (templates and patterns) it can just be a matter of what is exposed as content—ff there are no named static blocks, for example, perhaps that just doesn't get exposed in content-only. But blocks like site-title, site-logo, navigation, etc, that are already global in attributes would be very useful to have the ability to edit their "content" without having to go into design mode for it.

@SaxonF
Copy link
Contributor

SaxonF commented Oct 1, 2024

The video here (and attached) touches on this a little bit, specifically at 2.30 mark. As an interim step I think we can still follow the same rules as synced patterns in that editing a template part should require a dedicated "edit" click. This transitions you into a global context. We can do a much better job of highlighting that context in inspector etc.

314389161-77bfc27c-9646-4db8-8487-c1eb70b691eb.1.mp4

The video here is also related and shows highlighting what's editable in inspector.

@getdave
Copy link
Contributor

getdave commented Oct 23, 2024

@sethrubenstein
Copy link
Contributor

@getdave Is my understanding correct that the new "Drilldown" interaction for content-only mode would allow these blocks to maintain their block context while editing? Currently, this context gets detached when editing patterns in isolation.

That's really my only concern with changing the template part interaction model is that it could break a few blocks we have that provide context to inner blocks, including template parts.

@getdave
Copy link
Contributor

getdave commented Oct 25, 2024

@sethrubenstein I'm afraid I'm not sure at this point. I took a look at that PR again yesterday. It's now fairly out of date and I'm not entirely convinced on the drill down idea. I'm going to close it out until we have more time to explore this. I'm currently focused on WP 6.7 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Pattern Affects the Patterns Block [Block] Template Part Affects the Template Parts Block
Projects
Status: Now
Development

No branches or pull requests

5 participants