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

New Block: Post Author #19696

Closed
mapk opened this issue Jan 16, 2020 · 19 comments · Fixed by #19894
Closed

New Block: Post Author #19696

mapk opened this issue Jan 16, 2020 · 19 comments · Fixed by #19894
Assignees
Labels
Needs Design Feedback Needs general design feedback. New Block Suggestion for a new block [Status] In Progress Tracking issues with work in progress

Comments

@mapk
Copy link
Contributor

mapk commented Jan 16, 2020

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

This is the Author block.

Features

  • Author block should handle display name or real name.
  • Link to profile or author archives.
  • Display a gravatar.
  • Allow change of author.

There should be explorations around how to achieve bylines with text like “By {authorName}“.

Mockups

Screen Shot 2020-01-15 at 5 22 06 PM

Questions

  • Can we link the author to the profile or author archives by limiting only those two options from the link icon in the Toolbar? This would be preferable to the sidebar setting option.
@mapk mapk added Customization Issues related to Phase 2: Customization efforts New Block Suggestion for a new block labels Jan 16, 2020
@mapk mapk changed the title New block: Author Block New block: Post Author Jan 16, 2020
@mapk mapk changed the title New block: Post Author New Block: Post Author Jan 16, 2020
@epiqueras
Copy link
Contributor

Can we link the author to the profile or author archives by limiting only those two options from the link icon in the Toolbar? This would be preferable to the sidebar setting option.

Yes. Can we also make the actual block editable as well? Instead of changing the author in the sidebar, you would do it directly on the block while it is selected.

@mapk
Copy link
Contributor Author

mapk commented Jan 16, 2020

Should we have some mechanism that only allows valid user names to be inserted in the block? I don't think it should be free form editing, do you? This is why I restricted it to a dropdown. If it can be done another way in the block, let's give it a try.

@mapk mapk added the Needs Design Feedback Needs general design feedback. label Jan 16, 2020
@epiqueras
Copy link
Contributor

epiqueras commented Jan 16, 2020 via email

@mtias
Copy link
Member

mtias commented Jan 16, 2020

Some thoughts and challenges:

  • Should have customization options for the link aspects (these should ideally be shard with things like navigation item in menus) — color, size, underline.
  • Likely needs to handle display name vs full name.
  • Should have both view only and edit modes (switching author).
  • Should have a state for template editing that shows placeholder "author name" generically.
  • Should author bio be a separate block or a setting?

How would bylines be achieved? Cases like “Written by {authorName}“. In these cases the block functions more like an inline token, but that is not a great for discovery and UX reasons. Would it make sense to have a field in the sidebar for "prefix" / "suffix" on this block? (Once added it should be directly editable.)

@epiqueras
Copy link
Contributor

Should have customization options for the link aspects (these should ideally be shard with things like navigation item in menus) — color, size, underline.

Yes, we need to reuse link controls.

Likely needs to handle display name vs full name.

Yes, Mark mocked that up.

Should have both view only and edit modes (switching author).

Agreed, when selected it should switch to edit mode.

Should have a state for template editing that shows placeholder "author name" generically.

Yeah.

Should author bio be a separate block or a setting?

I'd say it belongs in this block. A lot of concerns are shared. If someone wants to separate a byline from the bio they can just use two of these blocks.

How would bylines be achieved? Cases like “Written by {authorName}“. In these cases the block functions more like an inline token, but that is not a great for discovery and UX reasons. Would it make sense to have a field in the sidebar for "prefix" / "suffix" on this block? (Once added it should be directly editable.)

I suggest we have an inline token local to this block for the author's name part. The rest would just be edited like a regular paragraph block.

@mtias
Copy link
Member

mtias commented Jan 16, 2020

Maybe a button "add byline" in the toolbar can work.

@epiqueras
Copy link
Contributor

Yes, that would work.

@draganescu draganescu self-assigned this Jan 24, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 25, 2020
@draganescu
Copy link
Contributor

I suggest we have an inline token local to this block for the author's name part. The rest would just be edited like a regular paragraph block.

@epiqueras is there another block using this idea of inline tokens?

@epiqueras
Copy link
Contributor

No.

I would try an approach like #19715 first with input before and after the author's name.

@draganescu
Copy link
Contributor

Hey @mapk ! I am advancing on this block in this PR #19894. I am not sure how you'd imagine linking the author, without the inspector.

@mtias suggests edit and view modes, then, UI-wise, would edit simply be a special LinkEditor?

In the comments above there is also the idea of having the author bio in the same block. However the author bio may be quite long, where would that fit with the small space this block is by default? I am thinking a simple paragraph, below the name, that would be full width of the block's parent.

Also, what does the "Add author" button in the mock-up inspector do?

@mapk
Copy link
Contributor Author

mapk commented Jan 29, 2020

While thinking about this, if the user is able to edit the Author's name in the block, change the color of the text, and link the name to the bio, or wherever... this block begins to feel like a simple Paragraph block.

So let me push back a little. Maybe a block such as this one should be more limited with what it allows. It's being used for a very specific need – to show the author of the post.

With this in mind. I believe it should inherit the author's name from the Post itself. If the user is allowed to edit the author's name, then that feels like a secondary action which should reside in the Inspector. Having toggles there that allow the user to add/remove specific content, or change the display name feels right to me.

Author with Avatar

1

Author with all the fixins

2

Author with Style Variation (Large)

3

These should definitely be iterated on. I'm just trying to get some ideas out there in regards to settings and how those settings may effect the overall layout of the block.

@epiqueras
Copy link
Contributor

Couldn't the same combos be achieved with scoped block patterns? This would be nicer as you could further customize things through direct manipulation of the blocks used.

@mapk
Copy link
Contributor Author

mapk commented Jan 29, 2020

Couldn't the same combos be achieved with scoped block patterns?

Yes, but then it's a Block Pattern and not a block, right? Which is do-able if we want to pivot our efforts here.

@epiqueras
Copy link
Contributor

They would be block patterns/variations of the Post Author block.

We could benefit from being more granular and have things like the Post Author Avatar be a block itself that you reposition freely and combine with static content as well as things like the Post Author Name.

@mapk
Copy link
Contributor Author

mapk commented Jan 30, 2020

Like child-blocks of the Post Author block! So these blocks wouldn't be available outside the Post Author block. Does this get too meticulous for a block that just needs to show some author related stuff?

I'm open to trying it out.

@epiqueras
Copy link
Contributor

epiqueras commented Jan 30, 2020 via email

@draganescu
Copy link
Contributor

@mapk would the byline and the author description be editable as well?

@mapk
Copy link
Contributor Author

mapk commented Jan 30, 2020

@mapk would the byline and the author description be editable as well?

I believe the byline can be editable. The bio should not be editable unless there's a way we can update what's on the user's profile page and inform the user that they're making a global change.

Screen Shot 2020-01-30 at 7 50 15 AM

I think, for the first iteration, we just add the bio or not. If they want to change it, they can do so on the user profile.php page. What do you think?

@epiqueras
Copy link
Contributor

There is a way to do it just like all the other global changes.

Happy to leave it for a later iteration, too, though.

@mtias mtias removed the Customization Issues related to Phase 2: Customization efforts label Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback. New Block Suggestion for a new block [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants