-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Enable the user to switch which entity is being previewed in the template editor #28466
Comments
From the Design Triage today, we agreed that this feature would be interesting to try out. The workflow seems logical and natural as a user. As the Preview/View button drop down is suitable area to view an aspect of the web site. The feature fits in there. It would also be nice with some feedback from @shaunandrews and @joen as well. |
Generally I like the idea; I think the View menu is a good place for this functionality. Would the list of entities include all of them, or some curated list of "favorites" or example content? I wonder how the menu would look/work if there was, say, 30 different items. There'd probably need to be a way to search. The drilldown pattern works if you have more than a few items. If there's only 5 items, it might be better to just display them without the need to drilldown. |
To begin with I think it would include all entities that resolve to display the current template. There could indeed be a lot of data there, so some kind of search / pagination would be good to explore.
Agreed. This needs a little more exploration work for different situations. For example if a site only has an index template then everything from single post entries to author archives will utilise that template, and subsequently everything could be used to populate that template as a preview while editing it. That is where the drilldown will come in to its own. |
I'm not so sure. Viewing how this page will look on a mobile app and selecting which content to pre-fill the template with feel very different from one another and I'm not sure I'd think to look in this dropdown menu for this. A sidebar section could give you more room and make it more discoverable. Small copy suggestion: |
While I agree they are different exercises, I still think they are related in the sense that their shared purpose is to provide an illustration of how the template will render in different circumstances. Perhaps there's a better label(s) we could use for the menu and its options?
This is true, but conflicts with the principle that the sidebar is for settings, which this is not. So I am hesitant to put this there. The only other location I can think that might work is the template dropdown:
👍 |
Right now, the template editor is a child of the post editor but this proposal make it different and it blurs the lines between the template editor and the site editor. For this reason, I think it's a bit too soon to do what's being proposed here. It also raises bigger questions like: Why I'm being shown "Post A" when I'm editing "Post B". If we want to consider the "template editor" as its own screen, that just means remove it in favor of edit-site. |
History
Usability — Self observation
User Experience — Professional Opinion
|
Food for thought: "Full" (!) as in "Full Site Editing" — Stick true to that.
I know it's hard. But it must be possible! Elegantly. That's the UX design challenge here! |
Hey @jameskoster what's left here after the introduction of the content editing in the site editor? |
@youknowriad this is a slightly different flow that isn't covered yet. Example: You're editing the I don't think it's high priority and there may be a better, more holistic way to capture it such as providing a way to preview unsaved changes in the site editor. |
Loved reading through the discussion so far. We run into this problem while redesigning WooCommerce blocks. When editing a product page, knowing what it's going to look like for different products and product types is crucial. I came up with a few ideas that I think could apply beyond Woo's use cases. There’s nothing in the current UI that we’d link to how the editing is done except for the controls in the top left corner. Perhaps we’d have an extra context toggle where the user could choose to show/hide the template and choose the template’s context? We’d default to placeholders, of course. Note that we're also surfacing controls for different product states, like on sale or featured. This is important because depending on the store's setup, the PDP may look different when the product goes out of stock or is put on sale. As an alternative, I looked at displaying the content controls in the Template tab in the Inspector. It makes sense on the surface, but then most settings there are about the block's appearance or shopper's experience and it can be confusing to see there something that's purely an editing tool (hence why I think a tool-first approach above may be more logical). We'd compliment either solution with a dismissible notice informing the user about the currently edited template variation. On top of all that, I looked at a dedicated mode, which would let the user pick the content while previewing the template. This, however, would be a major departure from the current flows and poses certain risks to extensibility. preview.movI look forward to hearing from you. Do any of the solutions above solve the problem? Is there anything we can learn from them to push the work forward? As I mentioned earlier, preview content support is essential to a good store editing experience in WooCommerce and I'd love to get things off the ground and continue refining the UX later on. |
Thanks for sharing. Instead of a whole new menu, I wonder if the menu in your first concept could be integrated with the current View menu somehow? To tidy things up a little Status and Stock could be flyouts, making use of DropdownMenuRadioItem / DropdownMenuCheckboxItem. |
Could work. A quick mockup based on core templates / DropdownMenu V2 components, and factoring in zoom controls: |
The existing flow from editing a post to editing the post template creates a view where the user is editing a template with a specific entity loaded in to provide context.
In the site editor it is also currently possible to edit a template without any context, and see placeholder content in lieu of actual post data.
Since all the pieces exist to do so, we should consider allowing the user to switch which entity is being previewed while editing a template. This will be a useful tool to ensure that any template edits in the current session will play nicely with a variety of compatible entires.
We can utilise the "View" menu (proposed in #27847) to contain this affordance.
Because the organisation of content can get quite complicated on larger sites, we might use the drilldown pattern from the site editor navigation to keep this menu simple:
content.mp4
It is (hopefully) quite easy to imagine different sections for different content types.
Once content is selected, an interstitial indicates which blocks are looking up post data.
The text was updated successfully, but these errors were encountered: