Skip to content

Commit

Permalink
Merge pull request #34077 from dragnoir/fix-33709
Browse files Browse the repository at this point in the history
Fix: remove overlay on emoji top scroll bar
  • Loading branch information
marcochavezf authored Jan 10, 2024
2 parents 0ffca02 + 6d691d2 commit ed99daf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/components/EmojiPicker/EmojiPickerMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const throttleTime = Browser.isMobile() ? 200 : 50;
function EmojiPickerMenu({forwardedRef, onEmojiSelected}) {
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const {isSmallScreenWidth} = useWindowDimensions();
const {isSmallScreenWidth, windowWidth} = useWindowDimensions();
const {translate} = useLocalize();
const {singleExecution} = useSingleExecution();
const {
Expand Down Expand Up @@ -335,7 +335,7 @@ function EmojiPickerMenu({forwardedRef, onEmojiSelected}) {

if (item.header) {
return (
<View style={[styles.emojiHeaderContainer, target === 'StickyHeader' ? styles.mh4 : undefined]}>
<View style={[styles.emojiHeaderContainer, target === 'StickyHeader' ? styles.stickyHeaderEmoji(isSmallScreenWidth, windowWidth) : undefined]}>
<Text style={styles.textLabelSupporting}>{translate(`emojiPicker.headers.${code}`)}</Text>
</View>
);
Expand Down Expand Up @@ -368,18 +368,7 @@ function EmojiPickerMenu({forwardedRef, onEmojiSelected}) {
/>
);
},
[
preferredSkinTone,
highlightedIndex,
isUsingKeyboardMovement,
highlightFirstEmoji,
singleExecution,
styles.emojiHeaderContainer,
styles.mh4,
styles.textLabelSupporting,
translate,
onEmojiSelected,
],
[preferredSkinTone, highlightedIndex, isUsingKeyboardMovement, highlightFirstEmoji, singleExecution, translate, onEmojiSelected, isSmallScreenWidth, windowWidth, styles],
);

return (
Expand Down
7 changes: 7 additions & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3327,6 +3327,13 @@ const styles = (theme: ThemeColors) =>
verticalAlign: 'middle',
},

stickyHeaderEmoji: (isSmallScreenWidth: boolean, windowWidth: number) =>
({
position: 'absolute',
width: isSmallScreenWidth ? windowWidth - 32 : CONST.EMOJI_PICKER_SIZE.WIDTH - 32,
...spacing.mh4,
} satisfies ViewStyle),

reactionCounterText: {
fontSize: 13,
marginLeft: 4,
Expand Down

0 comments on commit ed99daf

Please sign in to comment.