Skip to content

[HOLD for payment 2023-02-23] Web - Chat - Overlapping of two modal windows #13871

Closed

Description

@kbecciv

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


Action Performed:

  1. Go to URL
  2. Login with any account
  3. Go to any chat
  4. Click on "+" (don't choose anything)
  5. Press the combination "CTRL+I" on the keyboard

Expected Result:

Modal windows NOT overlap

Actual Result:

Modal windows overlap

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Windows / Chrome

Version Number: 1.2.45.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e53ae5747e85f4a8
  • Upwork Job ID: 1608883645591175168
  • Last Price Increase: 2022-12-30

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 28, 2022
  2. locked and limited conversation to collaborators on Dec 28, 2022
  3. davidcardoza commented on Dec 29, 2022

    @davidcardoza
    Contributor

    i am heading out of the office. I am going to reassign this out to make sure the issue is being evaluated properly.

  4. removed their assignment
    on Dec 29, 2022
  5. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 29, 2022
  6. pecanoro commented on Dec 29, 2022

    @pecanoro
    Contributor

    @laurenreidexpensify I think we have two options here:

    • If we are pressing the shortcut after the menu is open, we could close it and open the shortcut modal.
    • Open the shortcut modal on top of the menu that is already open since it was the second one that was triggered.
  7. self-assigned this
    on Dec 29, 2022
  8. added
    InternalRequires API changes or must be handled by Expensify staff
    on Dec 30, 2022
  9. pecanoro commented on Jan 3, 2023

    @pecanoro
    Contributor
  10. 39 remaining items

  11. situchan commented on Feb 19, 2023

    @situchan
    Contributor

    I found regression from #13956 which fixes this issue.
    Dev console error shows when press Cmd+I while any popover is open
    regression

    Root cause:
    It's bad practice to call function directly in render():

    const Popover = (props) => {
    if (props.isShortcutsModalOpen && props.isVisible) {
    // There are modals that can show up on top of these pop-overs, for example, the keyboard shortcut menu,
    // if that happens, close the pop-over as if we were clicking outside.
    props.onClose();
    return null;
    }

    Solution:
    call onClose() only when isShortcutsModalOpen is updated.
    Since this is function component, useEffect() can be used, but I think it's better to move this logic to PopoverMenu componentDidUpdate

  12. pecanoro commented on Feb 20, 2023

    @pecanoro
    Contributor

    That's funny because I used to have it in the componentDidUpdate and changed it back 😄 Either way, the issue you link it's going to refactor the whole thing so I don't think we need to fix it right now since it's not breaking anything in particular.

  13. situchan commented on Feb 20, 2023

    @situchan
    Contributor

    That's funny because I used to have it in the componentDidUpdate and changed it back 😄 Either way, the issue you link it's going to refactor the whole thing so I don't think we need to fix it right now since it's not breaking anything in particular.

    Oh, any reason you decided to revert back? Just to avoid using useEffect?

  14. pecanoro commented on Feb 20, 2023

    @pecanoro
    Contributor

    No reason at all, to simplify the code after @mananjadhav suggestion here.

  15. mananjadhav commented on Feb 24, 2023

    @mananjadhav
    Collaborator

    @pecanoro @MitchExpensify Are we good to use the Testing steps from the PR for regression test proposal? I think they're straight forward.

    1. Login with any account
    2. Go to any chat
    3. Click on "+" (don't choose anything)
    4. Press the combination "CTRL+I" on the keyboard
    5. It should close the + Action menu popup
    6. Background should be disabled and modal should show on top of everything
    7. Repeat the process in different parts of the app and make sure the behavior is consistent

    Do we agree 👍 or 👎

    Also I am not sure how do I link the PR? This didn't work since the time we've added the Popovers and KeyboardShortcutsModal .

  16. pecanoro commented on Feb 24, 2023

    @pecanoro
    Contributor

    Yeah, it's not a regression, it has never worked since it was a limitation of modals as the solution here was actually closing whatever is already open because modals don't support more than one in a efficient way.

  17. mananjadhav commented on Feb 24, 2023

    @mananjadhav
    Collaborator

    Thanks for the comment.

    @MitchExpensify quick follow up on the payment here.

  18. MitchExpensify commented on Feb 27, 2023

    @MitchExpensify
    Contributor

    Thanks @mananjadhav ! I was OOO on Friday, paying now!

  19. MitchExpensify commented on Feb 27, 2023

    @MitchExpensify
    Contributor

    Done!

  20. mananjadhav commented on Feb 27, 2023

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions