You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$500] Web - Chat - Context menu emoji picker vanishes if resize the window #33787
Version Number: v1.4.20-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause-Internal team Slack conversation: @
Action Performed:
Login to ND Expensify
Open a conversation
Right click on a row/message to open the context menu
Open the emoji picker (+Add reaction)
Resize the window
Verify the emoji picker position is moved correctly/stayed in the same place
Expected Result:
Emoji picker position in Context menu is moved correctly/stayed in the same place
Actual Result:
Emoji picker position in Context menu vanishes as soon as window is resized
Note: I guess the issue is not caused by PR, but it is related though.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Web - Chat - Context menu emoji picker vanishes if resize the window[/-][+][$500] Web - Chat - Context menu emoji picker vanishes if resize the window[/+]on Dec 29, 2023
Please re-state the problem that we are trying to solve in this issue.
Web - Chat - Context menu emoji picker vanishes if resize the window
What is the root cause of that problem?
The statement want to hideEmojiPicker() when screen was small. But !isSmallScreenWidth show opposite value.
So whenever size changes, it always return true.
Please re-state the problem that we are trying to solve in this issue.
Web - Chat - Context menu emoji picker vanishes if resize the window
What is the root cause of that problem?
The current implementation of the Emoji Picker component is causing visibility issues based on screen size conditions. The code utilizes the isSmallScreenWidth variable to determine the visibility of the Emoji Picker on different screen sizes.
What changes do you think we should make in order to solve the problem?
The existing conditional logic for showing or hiding the Emoji Picker based on screen size conditions is causing inconsistencies in visibility. Specifically, the condition
if (isEmojiPickerVisible && !isSmallScreenWidth) {
hideEmojiPicker();
}
hides the picker on larger screens, while
if (isEmojiPickerVisible && isSmallScreenWidth) {
hideEmojiPicker();
}
hides it on smaller screens. Additionally, retrieving the anchor element using getEmojiPopoverAnchor() returns a null value, causing unexpected behavior in the picker's positioning. showEmojiPicker() causing the Emoji Picker to be stuck in the top-left corner due to the null value returned by getEmojiPopoverAnchor() so that won't work either.
if we remove this code, it works perfectly fine,
if (isEmojiPickerVisible && isSmallScreenWidt) {
hideEmojiPicker();
}
Activity
[-]Web - Chat - Context menu emoji picker vanishes if resize the window[/-][+][$500] Web - Chat - Context menu emoji picker vanishes if resize the window[/+]melvin-bot commentedon Dec 29, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0110541f71f2b5036f
melvin-bot commentedon Dec 29, 2023
Triggered auto assignment to @peterdbarkerUK (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 29, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 29, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (
External)aim-salam commentedon Dec 30, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - Chat - Context menu emoji picker vanishes if resize the window
What is the root cause of that problem?
The statement want to
hideEmojiPicker()when screen was small. But!isSmallScreenWidthshow opposite value.So whenever size changes, it always return
true.App/src/components/EmojiPicker/EmojiPicker.js
Lines 140 to 143 in b1c6883
What changes do you think we should make in order to solve the problem?
Change
!isSmallScreenWidthintoisSmallScreenWidth.Screen.Recording.2023-12-30.at.8.12.30.AM.mov
What alternative solutions did you explore? (Optional)
bernhardoj commentedon Dec 30, 2023
I think this is intentional #22792
kaushiktd commentedon Jan 2, 2024
Please re-state the problem that we are trying to solve in this issue.
Web - Chat - Context menu emoji picker vanishes if resize the window
What is the root cause of that problem?
The current implementation of the Emoji Picker component is causing visibility issues based on screen size conditions. The code utilizes the
isSmallScreenWidthvariable to determine the visibility of the Emoji Picker on different screen sizes.What changes do you think we should make in order to solve the problem?
The existing conditional logic for showing or hiding the Emoji Picker based on screen size conditions is causing inconsistencies in visibility. Specifically, the condition
hides it on smaller screens. Additionally, retrieving the anchor element using
getEmojiPopoverAnchor()returns a null value, causing unexpected behavior in the picker's positioning.showEmojiPicker()causing the Emoji Picker to be stuck in the top-left corner due to the null value returned bygetEmojiPopoverAnchor()so that won't work either.if we remove this code, it works perfectly fine,
Video:-
https://drive.google.com/file/d/1Jc_qyjs11bd7Ih-wjbVY8urdpiHRC_X_/view?usp=sharing
melvin-bot commentedon Jan 2, 2024
@peterdbarkerUK, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
peterdbarkerUK commentedon Jan 3, 2024
I agree this is intentional, closing!