-
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
Start a new post from Query Loop #23461
Comments
ResearchHere's a look at how other blocks allow the addition of new content inside them. Gallery block Columns block Buttons block & Navigation block All of these are quick ways to add content and keep the user relatively focused on the block at hand. The Gallery block does open the Media Library, but returns the user back to the block when a selection is made. Option 1: Create new post from within the Query blockCreating a new post could do something similar. A new post in the Query block would show block placeholders that conform to the layout pattern (ie. Post Title, Post Author, Post Excerpt, etc). When the placeholders are filled out, and the post is published, it would create a new post which includes any/all settings applied to the Query block such as the category or tags for filtering to ensure it shows up in the feed. Option 2: Create new post outside the Query blockNow because the Query block sorts the posts, this new content would have to follow that order. This makes it impossible to know where to position this new post before it gets published. This leads me to believe that the interface for creating new content should exist outside the block so that when it is published, it gets added in the correct order. Option 3: Create new post in new instance of EditorNone of the above solutions feel very strong when a user needs to publish a robust post and has a user subscription base that receives emails of new posts. Publishing a post that lacks any real content seems awkward. This makes me think that if a user is creating a new post from the Query block, they should be pushed to a new instance of the post editor. This flow breaks out of the Query block, and should alert the user of non-saved actions, and about this jump, before switching them to a new editor. Once switched to a new editor, the settings should automatically reflect the Query block's parameters from the other page to ensure that this new post shows up in that feed. FeedbackOption 3 feels like the strongest solution for this particular interaction. Creating a post within the confines of the Query block is too limiting. Pushing the user to a new instance of the post editor allows proper creation of a post that, when published, would not only notify all subscriptions, but also populate the Query block feed on the other page.
|
Hey @mapk - thanks for looking at this! It's not clear to me yet where we should add this, but your exploration with what currently exists for other blocks was really helpful! My first thoughts though were that option 3 (leaving the page) wouldn't be the best one. I feel like the direction is to be able to do it more intuitively and within the same page. |
Want to add that the people from Sensei (@yscik) implemented this kind of interaction to create and show lessons of a course. Maybe this is interesting to share some code. |
Hey @ntsekouras, that was my thought as well. But the more I dug into this, and the fact that a post needs to be published before seeing it in the feed led me to Option 3. Publishing a post is often a big deal sending out emails to subscribers, etc. And writing a post is a more involved process. In Option 1 & 2, I explored a possibility to create a post from within the block. But these were pretty limiting. Bringing all the features of the block editor into the Query block is too much, and limiting it gets tricky. If this is desired, for cases in which people want to just create some quick content, we can make it happen. I'm uncertain if this is the desired outcome. Still iterating though! |
I'm fine with just a link to a new post for the current post type at first, it doesn't have to be more involved than that. Worth noting I've seen some feedback that users can end up clicking on the [+] shown at the bottom as a way to add a new post. That's why it's important to remedy that flow gap. It's less important where the creation happens (the regular editor for a new post is the best and quickest start, there). |
The Good The Bad The Ugly Go ahead, make my day Example of our current notifications |
The query loop block should have an easy way to write new posts. I've noticed some users try to write posts directly in the content of the editor, either above or beneath what "latest posts" or the "query" shows. This seems like a great place to tie the loops, teach users, and guide them around creating content in the relevant places.
It's similar to how the navigation block should have a way to add a new page. Of course, once Query supports different custom post types, it should be routed accordingly.
Examples:
The text was updated successfully, but these errors were encountered: