-
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
Supplementary editing flow for "The Loop" template #26190
Comments
Hey @mtias I've been following the query block closesly as I've been creating a plugin which in effect does things in a similar way. I've even gone as far as launching a modal to redesign the contents of the individual post template within my loop/layout. Something that has been occuring to me on my journey (and as Gutenberg is moving forward), is the overlap between these inner blocks + re-usable blocks (and a need to have another way of accessing / editing them). For example, a re-usable block currently has an editing experience where it is grouped as a re-usable block, but you can edit the content of that via another screen to update all instances across the site (could that actually be a modal too?). Maybe we could use this as a way of unifying the editing experience across both concepts - for me, the re-usable block concept and editing an inner block via a modal could have a lot of overlap. |
Since this issue and #32317 are very closely related, some of the ideas that I shared there overlap with potential solutions here. In this comment I'll cherry-pick the relevant parts so that we can discuss whether they are adequate solutions to this problem on their own, or whether a truly dedicated loop-editing view is required (be it supplementary on singular). Highlight associated blocksIn the context of a non-isolated view for editing the loop template, the primary consideration is how we visually communicate the relationship between the document, the Query, and the loop template:
The first requirement is shared with template parts, so we can potentially take the explorations we've done in the Site Editor and apply them here. Namely: When a child block is selected, the parent exhibits a dotted outline. The second requirement is new and (to my knowledge) there is no existing pattern to take inspiration from. My initial thought is to use a different outline to highlight the same block-type across templates. In the screenshot above the Post Title block inside the Posts block (a Query variation) is selected. Therefore:
One key thing that differentiates the loop template from other templates is its local nature. This "template" isn't reusable in the traditional sense unless it is explicitly saved as a template part. Instead it will always be unique to the document it exists within. For that reason I'm a little more hesitant to utilise the isolated editing view as that feels like a global editing heuristic. |
The template contained within the Query and Loop blocks is a very powerful feature that already works great. In some cases, when there are too many posts rendered in the view, someone editing it might want to focus just on the inner blocks template in a singular view.
Perhaps there could be a way to open a modal from the Loop toolbar that renders a single post and allows modifying the template in a more focused way. This is a supplementary action and show not remove the current editing flow, which works well.
The text was updated successfully, but these errors were encountered: