feat: Add unicode character support for default avatars
This PR allows non-alphanumeric characters to appear as the default avatar for users and channels. (but only for strings allowed in the settings)
Proposed changes (including videos or screenshots)
Issue(s)
Closes #33602
Steps to test or reproduce
Further comments
Looks like this PR is ready to merge! 🎉 If you have any trouble, please check the PR guidelines
🦋 Changeset detected
Latest commit: d9f72797c1e1d46b25183948310cad3d4604bd0b
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 35 packages
| Name | Type |
|---|---|
| @rocket.chat/meteor | Minor |
| @rocket.chat/core-typings | Minor |
| @rocket.chat/rest-typings | Minor |
| @rocket.chat/uikit-playground | Patch |
| @rocket.chat/api-client | Patch |
| @rocket.chat/apps | Patch |
| @rocket.chat/core-services | Patch |
| @rocket.chat/cron | Patch |
| @rocket.chat/ddp-client | Patch |
| @rocket.chat/freeswitch | Patch |
| @rocket.chat/fuselage-ui-kit | Major |
| @rocket.chat/gazzodown | Major |
| @rocket.chat/livechat | Patch |
| @rocket.chat/model-typings | Patch |
| @rocket.chat/ui-contexts | Major |
| @rocket.chat/account-service | Patch |
| @rocket.chat/authorization-service | Patch |
| @rocket.chat/ddp-streamer | Patch |
| @rocket.chat/omnichannel-transcript | Patch |
| @rocket.chat/presence-service | Patch |
| @rocket.chat/queue-worker | Patch |
| @rocket.chat/stream-hub-service | Patch |
| @rocket.chat/license | Patch |
| @rocket.chat/omnichannel-services | Patch |
| @rocket.chat/pdf-worker | Patch |
| @rocket.chat/presence | Patch |
| rocketchat-services | Patch |
| @rocket.chat/models | Patch |
| @rocket.chat/network-broker | Patch |
| @rocket.chat/ui-avatar | Major |
| @rocket.chat/ui-client | Major |
| @rocket.chat/ui-video-conf | Major |
| @rocket.chat/ui-voip | Major |
| @rocket.chat/web-ui-registration | Major |
| @rocket.chat/instance-status | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Can someone please tell me... In the “Run rossjrw/pr-preview-action@v1” step of the “ CI / deploy-preview (pull_request) ‘ stage, I get the error ’Error: Resource not accessible by integration”, How can I resolve this issue?
Can someone please tell me... In the “Run rossjrw/pr-preview-action@v1” step of the “ CI / deploy-preview (pull_request) ‘ stage, I get the error ’Error: Resource not accessible by integration”, How can I resolve this issue?
don't worry about it.. this is not required to merge the PR, but the tests are..
also, do you mind explaining your use case? what character do you want to have used on avatars?
don't worry about it.. this is not required to merge the PR, but the tests are..
also, do you mind explaining your use case? what character do you want to have used on avatars?
Thank you for your support. Regarding the characters we would like to use for the default avatar, specifically the Japanese string.
eg.) Channel “公式” -> “公” is displayed. User “山田 太郎” -> “山” is displayed.
In both cases, we would like to be able to display anything that can pass the validation patterns specified in “UTF8_User_Names_Validation” and “UTF8_Channel_Names_Validation”, rather than being limited to alphanumeric characters.
Could you help me again?
but the tests are...
Test UI (EE) / MongoDB 5.0 (2/5) - Alpine (Official) (pull_request) Failing after 6m
I don't know why the error occurs. What should I do?
It seems to have succeeded except for “CI / deploy-preview (pull_request)”.
@sampaiodiego Could you review this? And if everything is ok, could you merge this?
Hmmm... I can't get the test to pass again. What could be the cause?
It looks like it might be some JIRA integration failing... does it pass locally?
@gabriellsh @Gustrb Please resolve the conversation.
Thanks for the changes @noobbbbb ! Looking much better now, I'll drop a new review soon
Please add a changeset stating the changes you've made, besides that, looking good to me :)
Please add a changeset stating the changes you've made, besides that, looking good to me :)
I added a changeset. However, this is my first attempt, so I may be wrong.
hey @noobbbbb it is pretty good, if you are curious about how changeset should be written you can take a look at our manual: https://developer.rocket.chat/v1/docs/development-workflow#adding-changeset-to-your-pull-request
Thanks for the changes @noobbbbb ! Looking much better now, I'll drop a new review soon
@gabriellsh Have you reviewed it? Please let me know if I missed something.
Looks good to me :)
Trying to run here, getting this error on meteor console:
And Avatars are not being shown:
Nor channels avatars:
I just checkout the code, yarn, yarn build and yarn dsv to run. There is something more that need to be done?
Added [0-9a-zA-Z\-_.\p{L}\p{N}\s]+ to accept the characters
But frontend dont accept them, it should accept?
@noobbbbb please add steps to test to the description of the PR.
Tested using .+ regex and it worked.
@noobbbbb please add steps to test to the description of the PR.
@jeanfbrito Thank you for your feedback! I have added the steps to test. Please let me know if you need any further updates.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 59.44%. Comparing base (
71fc001) to head (d9f7279). Report is 2 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #33882 +/- ##
========================================
Coverage 59.43% 59.44%
========================================
Files 2829 2829
Lines 68323 68326 +3
Branches 15131 15131
========================================
+ Hits 40611 40614 +3
Misses 25054 25054
Partials 2658 2658
Thanks @noobbbbb for the contribution! It'll most likely be available at 7.5 release.