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

Iterations on "Latest Posts" Block - version 2 #20046

Open
draganescu opened this issue Feb 5, 2020 · 2 comments
Open

Iterations on "Latest Posts" Block - version 2 #20046

draganescu opened this issue Feb 5, 2020 · 2 comments

Comments

@draganescu
Copy link
Contributor

@draganescu draganescu commented Feb 5, 2020

The LatestPosts block is one of the first blocks in Gutenberg and, also, one of the most important blocks for fast and easy full page building. This block has been iterated on from launch and in its current state can offer basic functionality for post listing pages.

@melchoyce outlined in #1594 the improvements which the LatestPosts block needed in Jun 2017 and today, in February 2020, that list is almost complete - pending one exception: displaying featured images.

Given the past iteration plan is done and that in the past three years the block gathered new ideas I propose this issue as an overview issue for new features that can be added into a, let's call it, a LatestPosts version 2.

This version 2 of LatestPosts should include:

There are a couple of things to keep in mind when developing for the LatestPosts
block, version 2:

  • With the advent of Full Site Editing there have been introduced a series of "Post Blocks", a set of blocks that can be used to describe and build a whole post in the context of a site page. These post blocks can be used to compose a full post and then display it in a loop.

    The current implementation of LatestPosts uses custom HTML to create the post structure in the loop. Optionally, if development of the LatestPosts version 2 takes a lot of time and the post blocks mature, we could implement the loop using these new blocks.

  • The more filtering features we add to the LatestPosts block the more it looks like a Queryblock, a block which doesn't exist yet but which could exist at some point (see issue: #2662 and prs: #20106, #3198 taking the first steps in this direction).

    This block would be a generalization of a block that can allow a user to visually customize a WP_Query for a specific post loop, ideally offering all the options that WP_Query does. We can either end up with both LatestPosts and Query blocks and use them when appropriate, or we can, at some point in the future, evolve LatestPosts into a more generic, all encompassing, Query block.

Are you a new contributor?

This issue itself is big but it can, and will, be divided into smaller issues (some already exist). Trying to implement any of the missing features above is a great way to start contributing to Gutenberg with code. Also reviews of open PRs, suggestions and perspectives on open issues, are of great value as well. If you want to help but have questions, please leave a comment here so we can discuss what would be the best next step for you.


TL:DR;
Having a more feature complete LatestPosts block is a priority for this year as it is a cornerstone of giving users easy control on post listings when working with Full Site Editing on their pages. Therefore jump in and let's build the best and most user friendly post listing block in the world!

@Ringish

This comment has been minimized.

Copy link
Contributor

@Ringish Ringish commented Feb 5, 2020

I'm a new contributor but I've been hacking and developing in Gutenberg for over a year for our clients. Including custom posts blocks.

Feel free to push me in the right direction or assign me to anything appropriate!

@ZebulanStanphill

This comment has been minimized.

Copy link
Contributor

@ZebulanStanphill ZebulanStanphill commented Feb 6, 2020

I recommend checking out the Custom Post Type block from Getwid. It is essentially a latest posts block for any post type. The template used for each of the posts in the list can be modified using the block editor. In other words, you can use the block editor to build a latest post item template, and then choose that template in the display settings of the block.

It was certainly one of the most creative uses of the block editor I've seen in a plugin, and I think it could be used as inpsiration for something similar in core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Phase 2
  
Backlog
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.