-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Comment Author Gravatar Block #30575
Comments
Could this be author-avatar and not author-gravatar? Most sites have some sort of avatar, but not everyone uses gravatar, and forcing a core block to be tied to an external service would be controversial to many. |
I don't disagree, but WordPress is already tied to Gravatar, so I don't know if this is the time or place for that discussion? This block would basically be an equivalent of |
I do wonder now whether this block should be more generic so that it can be used in both comment and post loops. "Author Gravatar" or something. |
Exactly. |
Ah yes, I'm with you now. "Author Avatar" or even just "Avatar" could work. |
It would be nice to also give the opportunity to upload another default avatar image. |
That's an interesting idea. I suppose we could pull the options from the avatar settings: into the "Advanced" panel on the block?
Since the block renders an image, I assume it will inherit styles from the image block. That may not be the case though, and in general I agree that particular style would be better handled by the border radius control. |
Well the avatar settings show really really old avatars (as it has not been updated in many years). |
That might be nice in the future, but for now it probably makes sense to work with what we have. |
Hello! 👋 I would like to wrap up all the issues related to the Post Comments block to start working on a Comment Loop block as explained in this tracking issue. I'd like to make a quick summary to ensure we are aligned on this one: DescriptionAdds the author avatar of the specific comment. Potential Settings
Requirements
References
Of course, any feedback is welcome 🙂 |
Hi there! May I take this one? Regarding the rounded option. What would be better for this case for the options? A toggle option or a text input for the border radius? |
Yeah let's add the border panel :) The Dimensions panel is also worth considering. |
Hi @jameskoster! The Dimensions panel, you mean for the Avatar size? I've taken a look at the post author avatar block. Regarding the size, I have seen that we receive a variable with 3 different size URL values. The approach, in this case, has been creating a selector with the three options. If we want a more dynamic option, like the width-height options. We can think about different approaches, of course, feel free to add more ideas, these are the ones I can guess right now:
Any recommendations about how to proceed? 🙂 |
I was thinking more about the padding options that come with the dimensions panel, but this is a good question! The design in the OP is based on the regular image block: These seem more flexible than the pre-determined sizes in the current block. I didn't include the alt text option as this should be generated dynamically. The "Image size" option was also omitted as that relates specifically to items in the media library (which gravatars are not). I suspect that the height/width settings will eventually move to the dimensions panel, but cannot say for sure. So in the mean time this approach makes the most sense to me. What do you think? |
Hi there! I've done some work on the component. If you prefer just to read, feel free to skip it and continue! All the code available is on this PR #35180 I've added both the border-radius option and the Image Dimensions field to the Comment Avatar. We have also the 25%, 50%, 75% and 100%. Right now, we are using the biggest size available on the WordPress site for Avatars, which is 96px, but you can increase to whatever size you want. Is there any recommendation on this? Should we set a maximum? Sizes of more than 96px will get blurry. For the resize box, I've put what we have for images, one dot on the bottom and the other one on the right or on the left, depending on if the site is RTL or not. In images, it also depends on the image alignment, but I think we won't have that alignment option on the comment Avatar. Also, if you only edit the height, is not increasing the image, as default CSS is giving a I will now work on the frontend display. It will use 96px, 48px or 24px size depending on the minimum width set up on the editor. (24 if the width is set up in less than 25, 48 if is less than 49, and 96 for the rest). |
Nice! I'll leave feedback on the PR :) |
Here is an initial take on the design for the Comment Author Gravatar block. This block should only be available in the Site Editor, and potentially only when editing certain templates (Index, Single, Singular, Page).
Design feedback is politely requested for all aspects:
Figma link here.
The text was updated successfully, but these errors were encountered: