-
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
Edit Site: Present "placeholder" blocks clearly #19256
Comments
Hi @mtias, I removed the Hight Priority label just because it is not blocking for the next WordPress release. |
@mtias Just to clarify my understanding, are you are saying that placeholder blocks need to represented in a unique way that is different than non-placeholder blocks? |
When we use the term "placeholder block", we usually refer to the gray blob you see when you first insert an Image block, it comes from the In the case of these blocks, post-title, post-content, post-date when seen in a site editor context, these are different and more literally a sort of placeholder content, lowercase P. The text and content of those blocks won't be editable in the site editor, compared to things like headings and paragraphs. Therefore it seems sensible to explore a visual presentation that implies this. |
Should we consider giving these blocks a unique name? I heard them referred to as "Full Site Editing Blocks" in the last theme-review meeting. Here's a few other possibilities:
|
While thinking about block placeholders today, I fiddled around with a variation in this Figma files: https://www.figma.com/file/hRTrdVwYqi0QwcSdo3gnZt/Full-Site-Editing-%E2%80%93-Post-blocks?node-id=95%3A0 I was thinking about the placeholder blocks and how they would differ from regular blocks (ie. more simplified, no user-generated content, basic) and also thinking how these might be explored in a template. So in this prototype, I've basically added my placeholder blocks to my template and am now laying them out a bit. |
That's an interesting approach but I think it deviates too much from the goal of having visual fidelity. It'd make it impossible to design the template without loading a post or page. |
Here's a mockup that goes from empty placeholder blocks, to blocks with content. When you select the content block (or one of its children) a search input appears that lets you select a post to show in the template. This is/was a quick mockup, but I could see there being some similarities with the new Link UI, following those patterns when searching for a post to show. |
Your mockup skills are solid, Shaun! It's very helpful to convey the point. This iteration feels like it well explores the idea that is generic placeholder-esque template building blocks. Another approach that seems worth exploring is the same idea, but with actual placeholder-content. Real text, real images. The latter potentially has the benefit of being a better live preview as you're building the template, instead of having to switch back and forth between preview and abstract block-architecture. It also addresses the challenge of hardcoded content — i.e. let's say I want every post to have social links at the bottom, preceded by a paragraph of text that says "Follow me on social media:" — that seems to be a situation that's worth thinking about. |
This is really quite enlightening. It feels like you are zeroing in on the right puzzle pieces, and that some of the pieces are starting to connect. I wonder, are we settling in on the grid-of-tiles way of creating these templates? If yes, what plan do we have for making this keyboardable / work for low-vision users? Are there other approaches to building a template? That's not necessarily to say that this isn't the right way, just that it feels like due diligence to explore all avenues before settling on one. |
There's been a few explorations on the grid over in #20000 (comment) On that thread, I touched on keyboard usability. Here's the concept I posted there: One of the early designs used a more table-like UI that allowed you to interact directly with the gridlines.
I think the grid-of-squares UI works well, but would be open to other ideas for building a template. In some ways, I'm thinking of the Template essentially being a Grid block with special powers. |
The work you've done here, and the work that's gone into the grid block itself is beyond impressive, and it's very probably the right approach. My only hesitance is that there are layouts it can't accomplish, like overlap or crazy animated cells or other things. But arguably that's not the role of the grid block. |
Overlapping functionality would be amazing here! For example, if I created a Feature Image section and then wanted to add the Post Author block to overlap it. Maybe we need to think about a Placeholder block that works similarly to the Cover block in this case? One that would allow nested placeholder blocks. |
One thing that I think is important to keep in mind with this somehow, is how responsive breakpoints might work. But I think that's probably a top-level thing we need to get a handle on site-wide, and things like this (and global styles) could utilize that where needed. |
This is going a bit on a tangent. It is not about how to build or assemble a template, just about how the individual blocks present themselves when they have no user content loaded. Should it just have dummy content or descriptive content ("Post Title Goes Here")? Should it look exactly the same as it will look with real content? Should it always load the latest item (like a blog post)? |
I apologize for the tangent, but without understanding how the flow works (which includes building a template) its hard for me to design the placeholders in isolation.
I think a mixture of both could make sense. For blocks that we expect would contain a small amount of placeholder content, we could be descriptive. This descriptive text can help people indentify the placeholders, avoiding confusion over what is real content, and what is placeholder content. For blocks that we expect to contain a large amount of content, we could start with a short sentence of descriptive content followed by some public-domain content (like a book or short story). Another option is to use public-domain content and prefix with the word "Placeholder:":
I believe so, yes. As much as possible, the placeholder content should resemble real content.
Its possible we could load the latest post automatically for the Post template, or the latest page for the Page template — but I think trying to be clever like that could actually be more confusing. The flow would be more consistent if we defaulted to placeholder content all the time, with an easy way to choose real content to preview the template. |
A good example would be loading a template the theme has defined for displaying posts in the site editor. The user didn't build anything, they are just looking at a template. What should they see? |
I tried to approach this with a fresh mind, but I ended up covering a lot of the same ground that @shaunandrews did. I generally favor abstract, descriptive placeholders for simple fields (ex. "Post Title" for post title, etc.) and illustrative placeholders for complex and non-text elements (ex. anonymous avatar for author profile photo, the comment body from the example comment from the default install, etc.). I did have one additional idea to share: the toughest content to represent in the abstract is the Post Content, because that could be literally anything. What if that's the one field we don't try to abstract? I wonder if that would be a useful place to allow the user to populate the template with actual content: To be clear, those posts in the list would be the user's actual posts. |
Interesting take, Dave! I was curious if updating the Post Content from the block would feel awkward when that content updated all other blocks on the page. It doesn't feel bad. I might have to fiddle with it myself. Do you have the prototype link?
Also, can you share how each of the Post blocks look without actual content (of course they can include the placeholder content whatever that may be). For example, I don't see the Post Featured Image block in the prototype above. Maybe mockup how each of these placeholder blocks (without content) would look, one on top of the other similarly to the list Matias shared above.
|
Thanks for sharing @dwolfe . Like the idea of inserting post content into the template, but also see the issue @mapk is highlighting on the jump feeling weird when a person moves from a post, to the post template. Seem like something worth exploring more down the road. Till then we should consider strictly using dummy content. I think what you have in the mock above works well. The block content should be more instructional and/or contextual so it provides value and guidance, vs arbitrary text. To get this issue read for dev, a few things we should land on:
@mapk @mtias do we know who will work on this on the dev side? |
I definitely agree with that route. I would stick to just placeholder content in a block context (each item is a placeholder block).
I agree, but I think that's a future task.
Viewing live post will likely be the default in most scenarios. Placeholders are sort of an edge case when creating a new template or working with a template that lacks any page/post content to populate it. |
"Abstract" wasn't the best word. Maybe what I should have said is "try to represent authentically". Showing today's date in the Post Date block lets you see what that content will look like, just like (any) text in the Post Title block will. I only meant to suggest that maybe we shouldn't try to represent the Post Content, because its infinite variability makes it unique.
Yep, coming right up! A couple of notes about the mockups below:
Post TitleI'm assuming that the user could transform the Post Title into whatever text block they want to use - paragraph, heading, etc. But it's most likely that it'll be a heading, no? I've shown it here as a heading block, as a default. Post AuthorIn the Twenty Twenty theme, Post Author is one item in an inline list which also includes the Post Date and the Comment Count. But If the user is inserting it from the block inserter, outside of any containing block, I think a paragraph block makes the most sense, because it doesn't presume how the user wants to use it. Post DateA few of us now have suggested that this should default to today's date. Post ExcerptThis is my one attempt at educational/instructional text, which also happens to be a good stand-in for live content. This is 55 words long, which is the default for automatically generated excerpts. Featured ImageWireframe-y image placeholder - I'm assuming it would be resizable, and that the dimensions shown here in the label/overlay would update as the image is resized. As a default size, I used the width of the content area in the Twenty Twenty theme (610px), and a 16:9 aspect ratio. CategoriesWhen laying out and/or styling a template, I think it would be useful to see multiple items for list/group fields, to show spacing between the individual elements. Styling here is the default for the Twenty Twenty theme. TagsSame as Categories, styling is from Twenty Twenty. Post ContentExplained in previous comment above. |
Note: Please ignore the block toolbars in the examples above - I didn't think very much about what those should contain, I just wanted to include a toolbar to show the selected state. The block toolbar discussion is happening on this issue, and the above isn't a proposal for that. |
@dwolfe, I believe what you have here is good to get into a PR. My biggest question is around how it feels to manipulate the blocks without editing the content. This experience would be best in a PR. Once we get these in, along with the toolbar questions figured out, we can determine if more needs to be done to signify these are just placeholders and not actual content... until content gets added of course. Because the toolbars aren't dialed in yet, there still remains some questions around things like the Post Author Placeholder block's avatar. I imagine I should be able to turn on the avatar in the placeholder block and just get the generic Gravatar image. |
Work has evolved immensely since this issue was opened. As part of general clean up, I'm going to close this out as I am not sure what works remain with blocks introduced, placeholders improved, and iterations continuing on improving the initial set up state. Happy to reopen if there's some aspect of this that remains to be done or that requires this issue being open. |
When using the
edit-site
editor, there will be many blocks that are "tokens" for content that is going to be loaded dynamically. This includes blocks likepost-title
,post-content
,post-date
, and so on, since there is no specific post to show when in template editing mode. The clarity of this design — which is different to the placeholders shown in content blocks like images or cover — is crucial to understand when you are editing a template and when a specific page. This needs a few design explorations to see how close or how different it should be from current block placeholders.The text was updated successfully, but these errors were encountered: