-
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
Ensuring local content is not added at the global scope, and vice versa #55025
Comments
@richtabor that's an interesting approach I hadn't thought of. In previous iterations and a POC branch we used tabs which felt quite nice in practice but diverged a little from the toolbar thinking. We could also be super in your face about it when editing something that's global, even if its only when you come from editing a post/page. Keynote does something similar |
That's interesting. I like how Keynote has the 'Done' button in there as well. A helpful hint to get you back to the normal editing view. Worth an exploration I'd say. Currently the minor changes in the title bar get lost/are difficult to notice. I basically look for the "< back" to see if I'm editing a template. Or see if I get the annoying snackbar notification indicating the opposite. |
I played with this a bit today on a branch and the keynote while obvious it maybe feels a little too much. I think @jameskoster approach is worth exploring possibly in combination with using breadcrumbs instead a "back" button to provide a little more context. I don't like that we default to black for the canvas area surrounding the template as. Would be nice to choose a colour thats either light/dark depending on the background colour of the site. The only concern I have with this approach is if we ever offer a generic zoom function in future and how that would work here. |
While we are on this topic. Any thoughts on how to make it more obvious that the parts of a template are disabled when editing a page but still provide easy access to editing? This would replace the snackbar approach right now so possibly allow selection of the template as a "whole" which would be similar to synced patterns / template parts. This treats templates almost like synced patterns with overridable blocks (post title, post content etc). |
Sharing thoughts... Having a kind of closed area with a mostly transparent notice on top saying something like switch to full site editing, page/post editing etc when hovering/clicked. As it would give the obvious distinction between what is being edited and what can be jumped over to. I remember that last FSE testing to where one added a portfolio. It was hard to distinguish between post/page content and the template being edited. I really did not know where to add a new block. I asked myself a few times am I inside the page content or in the template now? Am I editing the template or page? These editing views merge too much as a better distinction is needed between the two modes. Having a way to make it really obvious and not something that is hidden away easily missed would be helpful. |
Making the template a selectable 'block' seems worth exploring. It's not clear to me how the Inspector behaves here though. Is it worth considering three tabs when content editing; Template | Page | Block? |
I'm working on a similar issue on the Woo side, where the Shop page is assigned to the Page Catalog template, but it isn't communicated anywhere in the interface (woocommerce/woocommerce#42152). It seems that the problem is a bit broader as there's currently some awkward behavior when the user attempts to edit a page assigned to a template.
You've already shared many great ideas. I took the liberty of mixing them with a few of my own in an attempt to improve the overall communication around the navigation, system status, etc. Let me know what you think! I'm particularly curious about changes to the inspector and the transition between Add links to swap and edit template in the page details view We'd only show the ellipsis on hover to reduce visual clutter. Wrap the template blocks in a group and show in the List View in the page editing view Blocks that have editable content could be marked with the partial lock icon in the List View. Add a Template tab to the inspector We would automatically select the Template tab when the user clicks the template parent block in the List View. The tabs would let the user switch between template options (areas, settings) and other templates. Similar to other explorations I've seen for reshuffling patterns, we'd let people change the template visually from within the inspector. We'd zoom out the page a bit to give the user a better overview of the template and see the page update in real-time as they switch between templates. switch.movShow a visual cue for locked blocks Template editing Additionally, we'd make the snackbar linking to the page permanent. We currently hide it after a few seconds, but it'd be useful to keep it on the screen until the user dismisses it manually. It'd serve as a way out in case the user entered the template editing mode by accident and can't find another way out. Lastly, we'd use the inspector to bridge the gap between a template and the pages it's connected to. Arguably, the sidebar in the template details view could be a better place for it, but it'd be useful to jump between templates and pages without exiting the editing mode. |
Thanks for pushing this Jarek, it's an important one, and you're connecting a lot of different issues with these mockups 💪 In the List view, do you think we could we use the generic The template toolbar could probably include a "Swap" action when appropriate. I'm not sure how I feel about the Template tab in page editing context but regardless; For the shuffle affordance, we'd need to be extra careful about making sure the user understands this would affect any content that uses that template. The zoom-out helps a bit to make that connection, but the UI might also benefit from a notice, ideally with a note about how many pages would be affected. Presenting the template preview option as a setting of the template doesn't feel quite right. Perhaps that panel should be titled "Preview"? What happens in List view when the template preview is turned off, could those features be connected with an 👁️ button like you find in the Layers panel of most design software? Since the context is page editing, that might be the more appropriate first tab. A small detail but; in the details panel, could the "Swap template" action live in the main ellipsis menu? In the template row, the name of the template could act as a shortcut to the template details, just like template parts. That would eliminate the need to add a new pattern to the details panel. Nice work! |
@jameskoster @SaxonF @jarekmorawski coming back to this one, do we think we have ideas enough to bring this home and update the issue? |
I think this one is worth a try.
Making the template a selectable "block" still seems like an interesting idea to me, but there are knock-on effects that make it one to explore separately imo. |
+1 to what Jay said. I explored this a bit on my own in the context of Woo's Shop page and came up with a few extra ideas for extra visual feedback when the user enters the template editing mode (note that this could work for dynamic pages and require additional consideration for regular pages):
Additionally, we could provide a little more context when the user edits a page linked to an existing template:
The video below captures all of these ideas in a single flow. For Woo, we'll likely make some changes to the template structure and will follow your lead for all other interactions, but I think these enhancements are worth considering. 🙏 templateediting.mov |
Want to update the issue and update the labels? |
Done! |
To add a bit more context to the problems at hand, here are a few repeated concerns that come up in real world feedback when working with folks:
drafting.a.page.mov |
@annezazu that looks like a bug. The "Testing" page is using the |
to @jarekmorawski point and image below, I think its also worth adding locked template blocks to the block list as another indicator. They would only be visible if the "show preview" option is enabled. In a follow up issue we can look at template selection on canvas as well as a visible way to show template and its actions in the inspector. @annezazu I think this is definitely worth adding to 6.5 |
Adding some more perspective. I have begun looking at WooCommerce. Added this discussion. https://github.com/woocommerce/woocommerce-blocks/discussions/11929 If I was in a page and saw areas that belonged to the template. Then clicked these areas it would be natural to have a message pop up that asks me if I want to edit the template for all the pages. I would click Yes to move to the site editor or no and move back to editing the page. I would not understand that the specific area belongs to the template. One can today wait a few moments and a mostly full page modal shows up asking if we can to insert a page template. Taking this one step further is to have the template auto inserted into the page, CPT, Learn, WooCommerce etc. I made this somewhat messy video. I hope the message come across in an alright way. |
@jameskoster Yep I shared the same designs here so ideally we can build in such a way we can reuse for synced patterns |
Thanks for summarising everything in the issue description @SaxonF. I'll start digging into the four aspects described. |
One thing we should consider when implementing stuff is that we should stop thinking of the post editor and the site editor as two separate editors. Both should work in the exact same (some small exceptions remain but hopefully we can remove them over time). |
Agreed, this is related to the top toolbar conversation as well, CC: @draganescu |
So we should add the chevron back to collapse the top toolbar even if there is nothing hidden behind it. |
Have we explored a less intrusive approach to indicating what can be edited? This is reminiscent of the Customizer edit icons. I'm not sure about the edit icons. Out of the box, everything on the page is editable, while we use lock icons to depict when something is not. We're doing the opposite here. Also this breaks the visual of this feeling like a front end page, but rather an application that you to fill out. |
There's been a bit of discussion about this between myself and @SaxonF and between @SaxonF, @richtabor, and @jasmussen. I'll summarise quickly where I think we're at with each of the four parts outlined in the description of this issue.
#57901 was merged which implements part of this but we've found it too distracting/overwhelming in practice. Saxon and I will iterate on this to make the outlines less prominent: flash them when the locked container is clicked, and then fade them out. I've started this in #58159. #57992 was opened which began to implement the other part of this but I've found it to be both technically cumbersome to implement Saxon and I agree it's not that urgent. Going to punt this idea for now.
@ramonjd opened #57572 which uses
Still to do.
Updating the list view to show the template as a selectable element only makes sense if we're also doing #57992. Therefore going to punt this idea for now, as well. |
In terms of 6.5, I'm going to remove this from the board based on the above. It sounds like most has been punted/the rest still needs more time. If that's incorrect, just let me know or add back onto the board! |
Great. I'll add those two to the board. |
Want to cross connect this issue with block outlines being hard to see when we look at the flash of the outlines as a solution: #41261 |
Hi folks, |
We can probably just go ahead and close this out. No doubt we'll keep making tweaks in this space but for now I believe we've merged as much as we have an appetite for. |
The site editor is now a space where you can now edit your post/page content within the context of a template, giving you a more complete and accurate view of what your site visitors will see. However, this does mean we need to ensure we are clearly communicating the distinction between what is global what is local so as to minimise the likelihood someone adds content to the wrong place.
We have noticed this is a common pain point particularly for end users who may be less technical.
There are four opportunities to improve clarity.
1. Highlight what's editable
At the moment, when editing a page with the template visible, we do not do a great job of highlight which blocks are editable at the local/page level. For example, the post title block, featured image, and post content. This increases the chances of "selecting" a block that exists outside the local scope, which creates possible pathways into the global.
template-edit-selection.mp4
2. Increase the prominence of the post content block when empty
When editing a page with the template visible, the current empty state of the post content block is a single empty paragraph. This is fine for posts that more orientated towards writing, but depending on the layout of your pages, it can get lost amidst everything else in the template. The hypothesis is that if we put more emphasis on the content block when empty, and provide shortcuts to patterns, it will lead to a higher chance of content being added there instead of the surrounding template.
3. Greater visual distinction when editing globally
When switching to editing a template from a page we change the toolbar title to purple but other than that we don't do a lot to tell a user they are about to modify something that may affect more than one page/pattern. Adding stronger visual indicators (along with improved empty states like the above content block) will alleviate this.
4. More obvious pathways between local and global scope
When in a site building state you often need to switch quickly between local and global as you refine how the two work together. There are three main ways of doing right now: via the command palette, via the template dropdown within the inspector, and via the toast notifications when clicking on a template. These pathways also act as indicators themselves as to which scope a user is currently in. What can we do to make switching contexts more efficient and visible?
template-edit.mp4
Original issue
Currently, very subtle distinctions exist between editing a template vs editing a page when in the Site Editor > Pages experience as shown below:template.UX.mov
You can see a notice about entering different modes and the Top Toolbar slightly changes but, beyond that, it's a drastic difference. Since the start of the Site Editor, a lack of distinction between editing templates vs content has led to confusion and incorrect actions on the part of users. For example, removing the post content block without understanding the full impact, often because the different views aren't clear (and the post content block doesn't look like their content!).
I know a lot of thought went into the notices and changes in the Top Toolbar but I wonder if we should consider something more drastic, similar to what we see in other applications like Keynote. We could also reuse the grey background experience that’s visible in template editing or incorporate more of the purple already used for the template parts to indicate when editing a template how it impacts more than just that page.
Curious to hear more thoughts from @WordPress/gutenberg-design and to see how we can continue to iterate here.
The text was updated successfully, but these errors were encountered: