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

[Comments Query Loop] [Query Loop] Consider using a generic Avatar block #38456

Closed
cbravobernal opened this issue Feb 2, 2022 · 4 comments · Fixed by #38591
Closed

[Comments Query Loop] [Query Loop] Consider using a generic Avatar block #38456

cbravobernal opened this issue Feb 2, 2022 · 4 comments · Fixed by #38591
Assignees
Labels
[Status] In Progress Tracking issues with work in progress

Comments

@cbravobernal
Copy link
Contributor

cbravobernal commented Feb 2, 2022

What problem does this address?

Right now, we have on Gutenberg two different blocks:

We are working in parallel, but, we are also taking the other's code quite a lot. Both are really similar, being the only difference in the data we fetch to get the Avatar (post author ID vs post comment ID), but both are just user ID.

What is your proposed solution?

Explore if it makes sense to have only a Core Avatar Block and absorb the complexity of deciding which Avatar should be displayed on each case. This way we can:

  • Reduce code duplication.
  • Reduce user complexity, as it would only appear one option when searching for an Avatar.

Screenshot 2022-02-02 at 18 05 37

Excalidraw link

CC: @michalczaplinski , @carolinan , @ntsekouras , @gziolo , @DAreRodz , @mtias

@michalczaplinski
Copy link
Contributor

Hey @c4rl0sbr4v0 I'm all in favour of working out a solution here - I only wonder why 7 of has have been assigned to this issue? 🤔

@carolinan
Copy link
Contributor

carolinan commented Feb 3, 2022

I agree.

It was suggested that there could be a user block with variations, but there was no interest or buy-in for that approach.
#24952

@cbravobernal
Copy link
Contributor Author

Hey @c4rl0sbr4v0 I'm all in favour of working out a solution here - I only wonder why 7 of has have been assigned to this issue? 🤔

That is my fault. I did that so you get notified and can discuss it 😅

@ntsekouras
Copy link
Contributor

ntsekouras commented Feb 3, 2022

Variations seem like it could work and is worth exploring for blocks like author name, avatar, etc.. where we would detect if we want to display info for post or comment authors. I'm not sure a specific user block is valuable if we have the other related blocks as standalone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants