Skip to content

[$500] Web - Chat - Context menu emoji picker vanishes if resize the window #33787

Closed

Description

@izarutskaya

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Found when executing PR: #33537

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:

  1. Login to ND Expensify
  2. Open a conversation
  3. Right click on a row/message to open the context menu
  4. Open the emoji picker (+Add reaction)
  5. Resize the window
  6. 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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6327679_1703784264370.2023-12-27_20-03-50.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0110541f71f2b5036f
  • Upwork Job ID: 1740853591428820992
  • Last Price Increase: 2023-12-29

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 29, 2023
  2. 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
  3. melvin-bot commented on Dec 29, 2023

    @melvin-bot
  4. melvin-bot commented on Dec 29, 2023

    @melvin-bot

    Triggered auto assignment to @peterdbarkerUK (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 29, 2023
  6. melvin-bot commented on Dec 29, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Dec 29, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External)

  8. aim-salam commented on Dec 30, 2023

    @aim-salam

    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 !isSmallScreenWidth show opposite value.
    So whenever size changes, it always return true.

    // In small screen width, the window size change might be due to keyboard open/hide, we should avoid hide EmojiPicker in those cases
    if (isEmojiPickerVisible && !isSmallScreenWidth) {
    hideEmojiPicker();
    }

    What changes do you think we should make in order to solve the problem?

    Change !isSmallScreenWidth into isSmallScreenWidth.

    Screen.Recording.2023-12-30.at.8.12.30.AM.mov

    What alternative solutions did you explore? (Optional)

  9. bernhardoj commented on Dec 30, 2023

    @bernhardoj
    Contributor

    I think this is intentional #22792

  10. kaushiktd commented on Jan 2, 2024

    @kaushiktd
    Contributor

    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();
                    } 
    

    Video:-

    https://drive.google.com/file/d/1Jc_qyjs11bd7Ih-wjbVY8urdpiHRC_X_/view?usp=sharing

  11. melvin-bot commented on Jan 2, 2024

    @melvin-bot

    @peterdbarkerUK, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  12. peterdbarkerUK commented on Jan 3, 2024

    @peterdbarkerUK
    Contributor

    I agree this is intentional, closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions