Skip to content

feat(avatar): ensure different backgrounds are generated for similar usernames, full names and user IDs #9277

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

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented May 7, 2024

Related Issue: #6497

Summary

This updates avatar to create unique background colors for similar name strings. This is done by mixing the input string in a deterministic way before building the hash and mapping the color.

@jcfranco jcfranco requested a review from a team as a code owner May 7, 2024 17:32
@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label May 7, 2024
@jcfranco jcfranco added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label May 7, 2024
@paulcpederson
Copy link
Member

This should be fine as it's still deterministic. Little code golf comment, but looks great 👍🏻

@jcfranco jcfranco added skip visual snapshots Pull requests that do not need visual regression testing. low risk Issues with low risk for consideration in low risk milestones and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 7, 2024
@jcfranco jcfranco merged commit bab77b5 into main May 9, 2024
@jcfranco jcfranco deleted the jcfranco/6497-improve-avatar-randomized-bg-color-on-similar-input branch May 9, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request. low risk Issues with low risk for consideration in low risk milestones skip visual snapshots Pull requests that do not need visual regression testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants