Gutenberg: New Block: Post Excerpt

Created on 16 Jan 2020  路  8Comments  路  Source: WordPress/gutenberg

As indicated in #15623, there will be a suite of Post blocks that make up the Post template.

This is the Post Excerpt block.

Features

  • Allow editing of the word count.
  • Allow direct editing of the "Read more" link.

Mockups

Selected (grays out the uneditable text)

Screen Shot 2020-01-15 at 8 20 33 PM

Unselected (text resumes normal color)

Screen Shot 2020-01-15 at 8 20 42 PM

Questions

  • Should we show a placeholder screen that allows the selection of a particular post, category, or tag?
  • Should this block inherit a parent block's settings like category type, or tag?
Customization Needs Design Feedback New Block [Status] In Progress

Most helpful comment

Yes

Allow direct editing of the "Read more" link.

All 8 comments

A placeholder screen might make sense if this block is ever used on it's own, but if it was the child block of a Posts template, I'd assume it would be repeated and that it would inherit the parent block's setting for a specific category, tag, or something like "recent."

Here's a quick mockup that doesn't take all this into account, but gets the point across.

Screen Shot 2020-01-15 at 8 20 54 PM

This block should never manage its own post context. It will just inherit it from a parent Post block or the top-level post context.

Should this block inherit a parent block's settings like category type, or tag?

I don't see how category type or tag is a setting of the post excerpt.

I don't see how category type or tag is a setting of the post excerpt.

I imagined if I was creating a Category page, listing excerpts of all posts with that category, then I'd want my post excerpts reflect that from the parent or CPT, right? Maybe I'm thinking about this incorrectly?

This is a Post Excerpt block, not a Post Excerpts block. The category page would wrap this in a query block that renders multiple instances of it, each with a different post context.

Would this be the block to also adjust the words "Read more.." or something else the user decides?
Example the user would like to instead use the words "Continue reading".

Yes

Allow direct editing of the "Read more" link.

Is there any objection to using a RangeControl with a value entry field for "word count"? Seems it may be a similar solution than the proposed control.

I'm not sure how valuable multiple pre-determined count variations would be - as the user would likely manipulate the count based on the font size/content width/theme style (and how those look work together).

And what do we think about adding fontSize capability, like the Paragraph block (as these are paragraphs)?

Is there any objection to using a RangeControl with a value entry field for "word count"?

That's what I did.

I'm not sure how valuable multiple pre-determined count variations would be - as the user would likely manipulate the count based on the font size/content width/theme style (and how those look work together).

Agreed.

And what do we think about adding fontSize capability, like the Paragraph block (as these are paragraphs)?

Makes sense.

Was this page helpful?
0 / 5 - 0 ratings