-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Fix emoji offset issues #8902
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
Fix emoji offset issues #8902
Changes from all commits
9c35a84
0d9d205
8ea2fff
eb49313
98f45b7
3c697bc
37622b3
1dd885d
7a226a6
5ca7584
18d826f
450146f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,17 +59,18 @@ class EmojiSkinToneList extends Component { | |
| () => this.setState(prev => ({isSkinToneListVisible: !prev.isSkinToneListVisible})) | ||
| } | ||
| style={[ | ||
| styles.pv1, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add this back to the emoji but include this on the emoji height so that we can cover this value. Motive should always be to keep the same UI. I see that UI is little bit different from staging.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not the reason for slight change in UI. It is due to the introduction of |
||
| styles.flex1, | ||
| styles.flexRow, | ||
| styles.alignSelfCenter, | ||
| styles.justifyContentStart, | ||
| styles.alignItemsCenter, | ||
| ]} | ||
| > | ||
| <Text style={[styles.emojiText, styles.ph2, styles.emojiItem, styles.textNoWrap]}> | ||
| {selectedEmoji.code} | ||
| </Text> | ||
| <View style={[styles.emojiItem, styles.justifyContentCenter]}> | ||
| <Text style={[styles.emojiText, styles.ph2, styles.textNoWrap]}> | ||
| {selectedEmoji.code} | ||
| </Text> | ||
| </View> | ||
| <Text style={[styles.emojiSkinToneTitle]}> | ||
| {this.props.translate('emojiPicker.skinTonePickerLabel')} | ||
| </Text> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Emoji Picker Header is what remains at the top, we need to subtract emoji picker header height not emoji height. Here, this calculation is trying to detect if emoji has gone out of view while pressing up arrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's put this as a comment in the code.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parasharrajat Any suggestion?
} else if (offsetAtEmojiTop - CONST.EMOJI_PICKER_HEADER_HEIGHT <= this.currentScrollOffset) { + // As Emoji Picker Header is what remains at the top, EMOJI_PICKER_HEADER_HEIGHT is subtracted from offsetAtEmojiTop targetOffset = offsetAtEmojiTop - CONST.EMOJI_PICKER_HEADER_HEIGHT; }