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

Author block: enhancement ideas #24952

Open
alaczek opened this issue Aug 31, 2020 · 42 comments
Open

Author block: enhancement ideas #24952

alaczek opened this issue Aug 31, 2020 · 42 comments
Labels
[Block] Post Author Affects the Post Author Block [Type] Enhancement A suggestion for improvement.

Comments

@alaczek
Copy link

alaczek commented Aug 31, 2020

I wanted to bring up a few enhancement ideas for the Author block, based on popular patterns found in themes:

  • have an option for a circular avatar image
  • have an option to put the avatar to the right or above the author name (stacked)
  • have an option to put the byline next to the author's name
  • include an optional "All posts by [author]" link
  • allow for each text component (byline, author name, bio text) to have different text styling - bold / italic / uppercase / letter-spacing / different size / different font family / different color

Here are some visual examples:

image

Describe the solution you'd like
Author block combines a couple elements - avatar, name, bio, and byline placeholder. Those kinds of complex blocks tend to be tricky because they are inflexible and would require a lot of block options/styles to allow for different design variations. How about if we broke it up into individual blocks (author name, avatar, and bio)? We could then put them back together however we wanted, and offer as block patterns. The downside would be the block pattern discoverability which isn't great right now. Or maybe we could have both the combined author block and the separate blocks?

@mtias mtias added the [Block] Post Author Affects the Post Author Block label Sep 1, 2020
@kjellr
Copy link
Contributor

kjellr commented Nov 5, 2020

A couple related suggestions based on using this block in Twenty Twenty-One Blocks:

  • The byline is only able to be placed above the author name. We should include an option for it to be placed at the left instead.
  • The byline and author name font sizes cannot be controlled independently. (The byline is always much smaller than the author name).
  • Currently, the author name has to be bold. We should allow folks to change this.
  • The author name should have the option to link to the author's archive page.
Current State What we'd like to achieve
Screen Shot 2020-11-05 at 7 34 03 AM Screen Shot 2020-11-05 at 7 33 39 AM

@annezazu
Copy link
Contributor

annezazu commented Mar 1, 2021

The byline and author name font sizes cannot be controlled independently. (The byline is always much smaller than the author name).

This came up as part of the second FSE outreach call for testing as being a bit confusing. "Write byline..." is both so tiny and not quite clear as a call to action. It's quite easy to miss as an option too particularly if you focus away from editing the block specifically:

focus.byline.mov

@scruffian
Copy link
Contributor

I think it would also be nice to have an option for an icon on this block similar to this:

Screenshot 2021-03-29 at 14 47 27

@annezazu
Copy link
Contributor

annezazu commented May 5, 2021

Including feedback from the fifth call for testing for the FSE Outreach Program as an additional idea/improvement: Vertical Alignment!

Vertical alignment is not centered (middle) and can not be controlled. Would also be great to have an option to display avatar on top and manage alignment.

@carolinan
Copy link
Contributor

If this block is included as is in 5.8, can it still be split into individual blocks later? I wonder if we need to reconsider including this.

@alaczek @kjellr do you consider any of these individual remarks as must haves for 5.8?
For example, making the author name a link to the author page.

@fklein-lu
Copy link
Contributor

fklein-lu commented May 6, 2021

I found this issue, as I was recently experimenting with the Post Author block, and it's impossible to get looking even half-way decent in it's current state:

  1. The CSS is very opinionated, and does not allow common styling, see Author block: enhancement ideas #24952 (comment). I'm now on my third FSE test theme, and I dequeued the author block stylesheet every time because it's much too rigid.
  2. It's impossible to create common styling options as showing in Author block: enhancement ideas #24952 (comment). This is because there's no control over common aspects such as avatar placement, or being able to target elements such as the author name or author description with global styles.
  3. Having this one monolithic block mainly controlled through the sidebar interface goes against the direction that Gutenberg has taken so far. The avatar, author name, and author description should be invidiual blocks. Patterns for complex displays can be included with the plugin.

So I second @carolinan in questioning the readiness of this block for 5.8.

@Sandstromer
Copy link

I agree with @fklein-lu's comment that the elements should be individual blocks, with patterns suggested in a similar way to how the Query block does it.

The optional "All posts by [author]" link suggestion by @alaczek could be accomplished by opening up the block-editor-link-control to return matching authors, much like how it currently returns other archives such as tags/categories. Would this be feasible?

@skorasaurus skorasaurus added Needs Dev Ready for, and needs developer efforts and removed Needs Dev Ready for, and needs developer efforts labels May 6, 2021
@cgaits
Copy link

cgaits commented May 6, 2021

I am sorry in advance if this is not allowed, but I seen this and it reminded me of this post. https://www.honeybook.com/email-signature. I love the Author block directions and if it becomes something people can use as a signature, it would be a value added feature. For example, if the author can have access to it for their posts globally, maybe as part of their .org account.

@carolinan
Copy link
Contributor

I think a general avatar block would be a good idea #30575

@kjellr
Copy link
Contributor

kjellr commented May 7, 2021

If this block is included as is in 5.8, can it still be split into individual blocks later? I wonder if we need to reconsider including this.

I'm not totally sure about this, but maybe @youknowriad knows?

@alaczek @kjellr do you consider any of these individual remarks as must haves for 5.8?
For example, making the author name a link to the author page.

In general I think the current block is just too complicated and opinionated. I'd prefer that for 5.8, it only showed the author name, and optionally linked to the author page. This would be a better 1:1 companion to the Post Date, Post Categories, and Post Tags blocks that it's going to be sitting next to most of the time. We could add additional features to that, but we're missing that simple baseline today.

@carolinan
Copy link
Contributor

carolinan commented May 8, 2021

Splitting the blocks is a simple task.
But I got stuck when I tried creating a new attribute for the post author block to pass the author id or author details as context to an inner avatar block 🤔

Ideas:

Name:
Toolbar: Left, center, right, bold, italic, (element/Level?)
Sidebar: Show first name, last name, or nickname and link to the author page or website.
font size, line height, text color, link color, background color, padding

  • On it's own, placed anywhere (When it is not inheriting user data from a parent, the block has its own select list of registered users)
  • As an inner block inside the comments
  • As an inner block inside "post author"

Avatar:
Toolbar: left/center/right/
Sidebar: Options to link to the author page or website, size settings,

  • On it's own, placed anywhere (When it is not inheriting user data from a parent, the block has its own select list of registered users)
  • As an inner block inside the comments
  • As an inner block inside "post author"

Biography:
Toolbar: Left, center, right, bold, italic,
Sidebar: font size, line height, text color, link color, background color, padding

  • As an inner block inside "post author"

@justintadlock
Copy link
Contributor

We really need to split this block into:

  • Post Author Name
    • Option to link to author archive or website URL
  • Post Author Avatar
    • Pretty much should work like the Image block
    • Same linking options for Post Author Name
  • Post Author Bio/Description

These are what I'd consider "must haves" for just the most basic of blog post design for theme authors.

The byline is only able to be placed above the author name. We should include an option for it to be placed at the left instead.

We need to think bigger than this and just outside of the Post Author block. All "post metadata" type of blocks need to allow for prefix/suffix text.

For example, here are some common patterns for post bylines/meta areas:

Written By Justin Tadlock · Published On May 13, 2021 · Comments

Justin Tadlock / May 13, 2021 / Comments

[avatar] Justin Tadlock -- May 13, 2021

The concept of a "separator" element is pretty common here too.

However, that is a bit problematic at the moment because all of these post meta blocks are block-level HTML elements. It's an easy fix with a custom .inline-block class or similar in a block pattern, but there's no easy way for users to do this via the editor.

@carolinan
Copy link
Contributor

Yes there needs to be a way to set both display and position ( like sticky) for well, all blocks, it just needs to be implemented.

@carolinan
Copy link
Contributor

I don't think the name needs to be limited to post author. If the name is a registered user it can be used to create things like staff or attendee pages.

@fklein-lu
Copy link
Contributor

I don't think the name needs to be limited to post author. If the name is a registered user it can be used to create things like staff or attendee pages.

The post author gets pulled from the post context, and it is a pre-established concept in WordPress.

We should not blurry these lines by allowing users to arbitrarily choose users. That should be a different block.

@carolinan
Copy link
Contributor

carolinan commented May 14, 2021

The block displays an option with a list of users, depending on if they have editing capabilities or not.
Changing the user updates the author of the post, but that could be disconnected.
Picture us coauthoring a post and we want both author names displayed.

@fklein-lu
Copy link
Contributor

Picture us coauthoring a post and we want both author names displayed.

That's a case for which there's prior art, and using blocks to solve this on an ad-hoc basis is not the right approach--and something we shouldn't encourage.

The post author block displays the single author of a post, and that's all it ever should do.

@carolinan
Copy link
Contributor

Having a post author block does not mean that there is no other use case for displaying a name and an avatar, including in the comments area.
That is why I suggested a name block that is also an inner block of the post author block.

@justintadlock
Copy link
Contributor

I could see "Post Author Name/Avatar/Bio/Etc." blocks just being variations of "User" blocks of the same type. There are tons of use cases for general-purpose user blocks. And, the post author is nothing more than a user object.

@carolinan
Copy link
Contributor

I wonder if, for 5.8, we should just start with removing the byline? It is difficult to use because of it's size and it may be easier to just have a paragraph outside the block.

@bobbingwide
Copy link
Contributor

I could see "Post Author Name/Avatar/Bio/Etc." blocks just being variations of "User" blocks of the same type

I fully agree. IMO each of the fields in both a post and a user should be available as separately selectable blocks or block variants. Then the Post Author block would just be a pattern.

@fklein-lu
Copy link
Contributor

The post author block could be a variation of a generic user block. However that's an implementation detail.

My concern is about the user experience:

  1. I add a post author block to a template. This shows the author assigned to the post.
  2. I change the user in the post author block. This would then re-assign the post to this user.
  3. I then add a second post author block--what happens now?

That's why I am so insistent on keeping this issue focused on the task at hand: a straightforward post author block.

I consider we all agree the current implementation isn't great, and we need something better now, as 5.8 is approaching fast.

Therefore I propose that we break this issue up:

  1. A ticket to have a post author name block for 5.8, as suggested by @kjellr.
  2. A ticket to have additional blocks (avatar, description,...) for 5.9 as suggested by @justintadlock.
  3. We include the byline discussion on a wider ticket about text and block combinations. Because to me it's a similar issue as Allow post meta to be arranged inline #26899. In my view the inline text issue deserves it's own ticket, because it's a recurring issue for multiple blocks that should be solved by a common approach. Probably a wrapper with specific inner blocks as @carolinan suggested.

@carolinan
Copy link
Contributor

We now have separate author name, avatar and biography blocks.

We do not have separate bylines or "view all posts by" blocks. -Experienced users will be able to add these manually, but do you think we need a "view all posts by" block? 🤔

I think that core should include some block patterns for this. We could start with some based on the designs in the first post.
What do you think @kjellr?

@kjellr
Copy link
Contributor

kjellr commented Mar 28, 2022

I'm not sure that we need a "View all posts by" block, but it might make sense to suggest author archive pages in the links panel:

joesmith

We do that for categories and tags, but (at least for me), I'm not seeing authors show up there.

@carolinan
Copy link
Contributor

It would be good to have a decision about if the author and avatar blocks are going to be in 6.0 and if that should include new patterns.

@annezazu
Copy link
Contributor

annezazu commented Apr 4, 2022

^ cc @adamziel and @gziolo for consideration and review as part of your sweeps :)

@gziolo
Copy link
Member

gziolo commented Apr 5, 2022

@carolinan, on the technical side of things I'm more than happy to promote Avatar blocks to stable state. Which new blocks are we talking about?

@carolinan
Copy link
Contributor

The blocks are:
Post Author biography (which is not marked as experimental)
Post Author Name
Avatar

I still have concerns about the overlap between these and the existing post author block.
There is no clear plan for if or how these blocks should replace the existing block, or if these should be innerblocks inside post author.

@annezazu
Copy link
Contributor

annezazu commented Apr 6, 2022

These blocks are also providing to be confusing as recent feedback from the thirteen call for testing for the FSE Outreach Program shows:

Should I add Post Author or Post Author Name block to the Query loop to see the post Author. I found out that I had to add the Post Author Name. As more and more blocks are added to Gutenberg it can also create some confusion how to use specific blocks. As some blocks are usually also associated with a specific “parent” block.

My main concern is for 6.0 and how I can best use the post author biography: Without the post author name block, which was not approved for 6.0, how do I show who the biography is for?

@justintadlock
Copy link
Contributor

I'd actually like to deprecate the old Post Author block, or at least remove it from the inserter. The original output is more of a pattern.

@gziolo
Copy link
Member

gziolo commented Apr 7, 2022

@justintadlock, we surely can remove the Post Author block from the inserter once we expose lower level author blocks. Unfortunately we need to keep it in the code for backward compatibility, but we can include the note it’s deprecated like for the following blocks:

@paaljoachim
Copy link
Contributor

paaljoachim commented Apr 7, 2022

While testing the PR by Carolina I came across a few things that could be adjusted.
Here are a few issues I made:

Post Author name and Biography blocks are missing text icons in the toolbar controls
#40150
Adding bold, italic etc to the toolbar would help shape the text.

Link modal suggestion: wp-admin, Dashboard, author, author archive and other unique WP links
#40155
Making it possible to find unique WordPress links also means we can link to these unique pages.
EDIT: Similar to what @kjellr mentioned above in this comment:
#24952 (comment)

Editing the text in Post Author Name block
#40157
Changing the text makes it possible to call the Author by another name, add About --author name-, even adding it to a View All Posts by -author name- below the biography area.

@annezazu
Copy link
Contributor

Noting that the inability to link to an author's archive came up in group testing as part of the thirteenth call for testing. With the new author template being available, it seems odd to then be unable to link to the specific created template.

@scruffian
Copy link
Contributor

Noting that the inability to link to an author's archive came up in group testing as part of the thirteenth call for testing. With the new author template being available, it seems odd to then be unable to link to the specific created template.

This feature is available in the new Post Author Name block:
Screenshot 2022-04-20 at 15 53 02

I don't think we should add this to the Post Author block too, as this block should be retired in favour of the new Post Author Name, Post Author Bio and Avatar blocks...

@annezazu
Copy link
Contributor

This feature is available in the new Post Author Name block:

From what I can tell, this block is not going to make it into 6.0 based on this discussion in core editor. From @adamziel: "The author name block has a generic version coming after 6.0. It will be usable in posts, comments, and outside of these. But it’s not there right now." I currently don't see it in 6.0 Beta 2.

Is that correct? If so, the issue remains that for 6.0 we need a way to link to the Author archives in order for the new Author template to be more useful/high impact. If this is just in limbo right now, that's totally cool. This is just causing some wider confusion and it would help to get more clarity on what's planned for 6.0 vs beyond. Thanks in advance for more insights. cc

@scruffian
Copy link
Contributor

This is an unfortunate consequence of the author name block not making it into 6.0. Maybe for now we just have to accept that this means that author template won't be that useful for now.

@tinjure20
Copy link

Inspired by @annezazu's FSE outreach call #13 and Justin's WP Tavern article, I have been working on an author template using Cover block as its header. The author name block was working expected both on the editor and on the browser in the front end.
author-1

When I recently returned to the project, the author name works on the editor, but the author name is not displaced on the front.

Editor:
author-2

Front end:
author-3

Testing environment:

  • WordPress 6.0-RC3
  • Gutenberg 13.2.1
  • MacOS
  • Browsers: Firefox, Chrome
  • Themes multiple, including TT2

@annezazu: I was wondering whether this was with me only or others are also experiencing similar problem.

@annezazu
Copy link
Contributor

@tinjure20 Exciting to hear you are exploring! Thanks for reporting back what you found. By chance, does this author not have any posts yet? If so, I bet you're running into this problem: #40431 Can you confirm?

@tinjure20
Copy link

Thanks Anne. This author has four posts on this test site, which are correctly displayed with default archive.html template. Pls. see below (partial screenshot, showing 2 of the four posts) with archive template.
author-4

@annezazu
Copy link
Contributor

@tinjure20 mind opening a new issue for this and tagging me? Want to preserve this thread for discussing enhancement ideas but still want to ensure this is dug into :)

@t-hamano
Copy link
Contributor

I believe that the various new features and ideas proposed here can now be realized using individually divided blocks (Avatar, Author Name, Author Bio).

Instead, I think we need to discuss whether to implement the proposed functionality in this Post Author block, or to deprecate this block without implementing any new functionality.

If it should be deprecated, I think this issue can be closed. Instead, there is #53427 which suggests deprecating this block.

@caseymilne
Copy link

I'd like to see "Author Avatar" as a separate block, and then build a pattern out of the Avatar, Name, Bio. A pattern inside a row with a stack seems to work nicely. I built one using an image block, it's not dynamic so it doesn't work for this but the layout was perfect for an author section. Image block supports rounding and sizes, border etc. Ideally the avatar block would extend from image block and provide most of those options as well.

Not everyone uses Gravatar, so the other issue is currently I found users with no gravatar result in a placeholder box... instead if no gravatar image is found, the image should be hidden so the output still looks good.

It's a shame there isn't a way to upload a profile image for each user. For those using ACF we can build a user image field, then build a block to dynamically pull that from the post author... but I guess building an entire field system so we can have profile images instead of Gravatar is probably outside the scope, got to work with what is available for a core block.

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 [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests