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

Post Content block improvements #32460

Closed
4 tasks
jameskoster opened this issue Jun 4, 2021 · 3 comments
Closed
4 tasks

Post Content block improvements #32460

jameskoster opened this issue Jun 4, 2021 · 3 comments
Labels
[Block] Post Content Affects the Post Content Block [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Jun 4, 2021

The current implementation of the Post Content block has a few issues.

First of all, if you insert a Query that contains a Post Content block in the post editor, the canvas renders a lacklustre "Block cannot be rendered inside itself." error message. Should it be possible for a Query in a post or page to display the full Post Content? If not then the block shouldn't be available in this context at all. If so then we should fix that error message.

In the Site Editor, a Query that contains a Post Content block will sometimes display all of its children in list view like so:

query.mp4

Naturally if you make changes here and save, those changes will be pushed upstream to the post itself. I think there is a discussion to be had around whether:

  1. List view should display the Post Content child blocks
  2. It should be possible to directly manipulate them on the canvas

My thinking is that seeing those child blocks in list view, and being able to edit them on the canvas is a bit overwhelming and unhelpfully blurs the line between template / content editing. Selecting and modifying blocks in the current document seems fine, but when the blocks leave the scope of the current document the experience can get confusing. That said, there should be a way to move from the Post Content block to edit the underlying post.


Tentative to-do list

  • Fix the error message in the post editor (or render the block contents)
  • Consider hiding the Post Content child blocks in list view
  • Lock selection and edit capabilities of blocks inside Query > Post Content (related: On Locking and TemplateLocking #29864)
  • Explore adding a shortcut to edit the reference post
@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. [Block] Post Content Affects the Post Content Block labels Jun 4, 2021
@jameskoster
Copy link
Contributor Author

I think this can be closed as most of the issues have been addressed in #32505, and will be further enhanced by #32317.

The "Block cannot be rendered inside itself." error seems to have been fixed along the way as well 🎉

@jenfloods
Copy link

I am creating a single post reusable block template. When I set up my blocks, when grabbing the Post Content block to use for Post content text to come through, it is taking my existing elements and duplicating it inside the Post block, there is also another Post Content block under all of this that I did not add. What is the resolution fix temporarily? I do not see where I can edit Post Content block.
Post Content block issues

@jameskoster
Copy link
Contributor Author

@jenfloods I think this warrants a dedicated issue. It looks like it might be a bug that occurs when the Post Content block is placed inside a Reusable Block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Content Affects the Post Content Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants