Skip to content

GH-439 move avatar into view component #930

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

aronwolf90
Copy link
Contributor

@aronwolf90 aronwolf90 commented Aug 23, 2025

Ticket: GH-439

NOTE: there are some changes in the size and colors to make avatars more consistent.

For example

Before After Diff
image image Color & initials
image image Initials can have more than two letters & small size change

@aronwolf90 aronwolf90 marked this pull request as draft August 23, 2025 01:13
@aronwolf90 aronwolf90 force-pushed the 439-move-avatar-into-view-component branch from 57c51fb to 309be6c Compare August 23, 2025 01:17
@aronwolf90 aronwolf90 force-pushed the 439-move-avatar-into-view-component branch from 309be6c to a3505f6 Compare August 23, 2025 01:27
@aronwolf90
Copy link
Contributor Author

aronwolf90 commented Aug 23, 2025

NOTE: It is only in draft because I want to test it a bit more tomorrow.

@aronwolf90 aronwolf90 marked this pull request as ready for review August 24, 2025 17:26
@aronwolf90
Copy link
Contributor Author

NOTE: It is only in draft because I want to test it a bit more tomorrow.

It is now ready for review

Comment on lines +8 to +10
<%= content_tag :span, class: text_size do %>
<%= avatarable.name.split(" ").map(&:first).join %>
<% end %>
Copy link
Member

@marcoroth marcoroth Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we always render the initials so that when the image fails to load that we can fall back to the initials?

We had this in some places where we had onerror="this.remove()" on the <img> tags which then revealed the initials if it failed to load.

Copy link
Member

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This aleady looks great, thanks for working on this @aronwolf90! 🙏🏼

We also have this page here: https://www.rubyevents.org/components

Would you mind adding your new component in all sizes/variants (image, initials, custom content) to that page too? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants