Repository navigation
fix: keep emoji intact in avatar initials (#3927) - #3930
Merged
Merged
Conversation
## π― Goal Closes #3922 Closes [RN-507](https://linear.app/stream/issue/RN-507) Avatar initials took `charAt(0)` of each word, which splits emoji stored as surrogate pairs, so a name like `π Smiley` rendered as `οΏ½S`. ## π Implementation details Words that start with an emoji now keep the whole emoji, including skin tones, flags and ZWJ sequences (`ππ½`, `πΊπΈ`, `π¨βπ©βπ§`). Hermes has no `Intl.Segmenter`, so we use explicit code point ranges and is capped at 32 code units. ## π¨ UI Changes <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## π§ͺ Testing / ## βοΈ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android
Contributor
SDK Size
|
Contributor
|
π This PR is included in version 9.11.2 π The release is available on:
Your semantic-release bot π¦π |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
π― Goal
Closes #3922
Closes RN-507
Avatar initials took
charAt(0)of each word, which splits emoji stored as surrogate pairs, so a name likeπ Smileyrendered asοΏ½S.π Implementation details
Words that start with an emoji now keep the whole emoji, including skin tones, flags and ZWJ sequences (
ππ½,πΊπΈ,π¨βπ©βπ§). Hermes has noIntl.Segmenter, so we use explicit code point ranges and is capped at 32 code units.π¨ UI Changes
Android
π§ͺ Testing
/
βοΈ Checklist
developbranchπ― Goal
π Implementation details
π¨ UI Changes
iOS
Android
π§ͺ Testing
βοΈ Checklist
developbranch