Skip to content

Comments

fix(NcAvatar): Improve initials generation to filter out special characters#4737

Merged
raimund-schluessler merged 1 commit intomasterfrom
fix/ncavatar-initials
Nov 2, 2023
Merged

fix(NcAvatar): Improve initials generation to filter out special characters#4737
raimund-schluessler merged 1 commit intomasterfrom
fix/ncavatar-initials

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Nov 1, 2023

☑️ Resolves

  1. Filter user names to only use real characters (for all languages) to generate initials and not using special characters like e.g. (.
  2. Use first & last name for initials instead of second name (e.g. First Second Last should be FL and not FS).

🖼️ Screenshots

🏚️ Before 🏡 After
image image
image image

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

@susnux susnux added bug Something isn't working 3. to review Waiting for reviews feature: avatar Related to the avatar component labels Nov 1, 2023
@susnux susnux force-pushed the fix/ncavatar-initials branch 2 times, most recently from d75be41 to 8392347 Compare November 1, 2023 21:22
Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

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

Everything is good from the component side, but I'd discuss some changes in tests.

…acters

Co-authored-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux force-pushed the fix/ncavatar-initials branch from 7f2ee0a to ce3f168 Compare November 2, 2023 02:21
Copy link
Contributor

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Super nice!

If Nextcloud's back-end also still generates avatars we should at least create a ticket to also improve the handling there. This avoid inconsistencies between avatars generated on the front or the back.

@raimund-schluessler raimund-schluessler merged commit 27b8c83 into master Nov 2, 2023
@raimund-schluessler raimund-schluessler deleted the fix/ncavatar-initials branch November 2, 2023 08:17
@raimund-schluessler raimund-schluessler added this to the 8.0.0 milestone Nov 2, 2023
@skjnldsv skjnldsv mentioned this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working feature: avatar Related to the avatar component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avatar placeholder should not take special characters

4 participants