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

Deprecate 'Post author' block #53427

Open
jameskoster opened this issue Aug 8, 2023 · 10 comments · May be fixed by #55352
Open

Deprecate 'Post author' block #53427

jameskoster opened this issue Aug 8, 2023 · 10 comments · May be fixed by #55352
Assignees
Labels
[Block] Post Author Affects the Post Author Block Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

The Post Author block combines the display of the author name, avatar, bio, and 'byline'. It's an older block that is fairly prohibitive in terms of design expression due to all the pieces being locked in position.

Screenshot 2023-08-08 at 15 11 10

Modern themes tend to make use of the newer Post Author Name, Avatar, and Post Author Biography blocks, combined with layout tools like Row and Stack to gain greater control over the display of this information.

To avoid users falling into the trap of using an outdated block it might be worth deprecating Post Author (IE not surfacing it in the block inserter(s)).

If the prescribed layout is deemed to be of value a core pattern could be included which is constructed from the aforementioned atomic blocks.

@jameskoster jameskoster added Needs Design Feedback Needs general design feedback. [Block] Post Author Affects the Post Author Block labels Aug 8, 2023
@jameskoster
Copy link
Contributor Author

Here's a pattern that could effectively replace Post Autho:

<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"left","verticalAlignment":"top"}} -->
<div class="wp-block-group"><!-- wp:avatar {"size":48} /-->

<!-- wp:group {"style":{"layout":{"selfStretch":"fill","flexSize":null}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"left"}} -->
<div class="wp-block-group"><!-- wp:paragraph {"fontSize":"small"} -->
<p class="has-small-font-size">Write a byline...</p>
<!-- /wp:paragraph -->

<!-- wp:post-author-name {"fontSize":"medium"} /-->

<!-- wp:post-author-biography {"style":{"layout":{"selfStretch":"fit","flexSize":null}},"fontSize":"small"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

@t-hamano
Copy link
Contributor

t-hamano commented Aug 8, 2023

I think this is related to #35596, but I agree with deprecating the Post Author block.

As for Byline, there is no block to display this on its own, but since it is rendered as just a p element in the Post Author block, I believe that a paragraph block can be substituted without going to the trouble of adding a dedicated block.

@jasmussen
Copy link
Contributor

No strong opinions, if the block was versatile it could have convenience factor, similar to how Media & Text has. Though if we keep it, is there any reason to call it "Post Author", as opposed to just "Author"? The prefix seems limiting, and presumably it can be used in more than just that one CPT.

@jameskoster
Copy link
Contributor Author

A pattern can be just as convenient, but with the benefit of flexibility. I can't really think of a scenario where it'd be beneficial for a user to use this block.

is there any reason to call it "Post Author", as opposed to just "Author"?

This applies to all 'template tag' blocks as discussed in #26856. I'd be in favor of removing the "Post" prefix wholesale. I think it's already been done for Avatar and Title so we're in an awkward middle-ground right now.

@richtabor
Copy link
Member

This applies to all 'template tag' blocks as discussed in #26856. I'd be in favor of removing the "Post" prefix wholesale

Same.

@t-hamano
Copy link
Contributor

In #53492, the "Post" prefix was removed from block titles. Can we consider deprecating this block again?

@jameskoster
Copy link
Contributor Author

We really should. That byline feature is confusing. Theme authors should be using the primitive blocks/patterns to make it easier for end users to customise the appearance.

@t-hamano t-hamano self-assigned this Oct 4, 2023
@t-hamano
Copy link
Contributor

t-hamano commented Oct 4, 2023

I would like to work on this issue. If we want to deprecate the Post Author block, just update the title, description, and supports.inserter in block.json.

Here is an example of the Comment Author Avatar block, which has already been deprecated:

I think what we need to consider is whether we want to provide a block pattern equivalent to the Post Author block.

There are not many patterns in the core. Personally, I think the pattern should be provided in the Patterns Directory and this block should just be deprecated in core and Gutenberg.

@jameskoster
Copy link
Contributor Author

Personally, I think the pattern should be provided in the Patterns Directory and this block should just be deprecated in core and Gutenberg

I agree. There could even be a dedicated category for these types of patterns – there are so many interesting ways to express this content.

@t-hamano
Copy link
Contributor

t-hamano commented Oct 5, 2023

Oops, I noticed that the deprecated Text Column block provides a transformation to Columns block.

We may need to provide a similar transformation for users who have already inserted the Post Author block into their content.

I'd like to build on the markup suggested in this comment and come up with some transformation logic to preserve block style and content as much as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Author Affects the Post Author Block Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

5 participants