Skip to content

Correct emoji presentation on emoji picker #4206

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

Merged
merged 2 commits into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/pages/home/report/EmojiPickerMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ class EmojiPickerMenu extends Component {
/**
* Given an emoji item object, render a component based on its type.
* Items with the code "SPACER" return nothing and are used to fill rows up to 8
* so that the sticky headers function properly
* so that the sticky headers function properly.
* We add '\uFE0F' to our unicode to force the correct emoji presentation (VS16)
* on emojis that also have a text style presentation (VS15).
*
* @param {Object} item
* @param {Number} index
Expand All @@ -313,7 +315,7 @@ class EmojiPickerMenu extends Component {
if (header) {
return (
<Text style={styles.emojiHeaderStyle}>
{code}
{`${code}\uFE0F`}
</Text>
);
}
Expand All @@ -322,7 +324,7 @@ class EmojiPickerMenu extends Component {
<EmojiPickerMenuItem
onPress={this.props.onEmojiSelected}
onHover={() => this.setState({highlightedIndex: index})}
emoji={code}
emoji={`${code}\uFE0F`}
isHighlighted={index === this.state.highlightedIndex}
emojiSize={this.emojiSize}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/report/EmojiPickerMenu/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ class EmojiPickerMenu extends Component {
if (item.header) {
return (
<Text style={styles.emojiHeaderStyle}>
{item.code}
{`${item.code}\uFE0F`}
</Text>
);
}

return (
<EmojiPickerMenuItem
onPress={this.props.onEmojiSelected}
emoji={item.code}
emoji={`${item.code}\uFE0F`}
emojiSize={this.emojiSize}
/>
);
Expand Down