Skip to content
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

[$1000] Hover options are stuck when we close the reaction emoji picker using ESC #18217

Closed
1 of 6 tasks
kavimuru opened this issue Apr 30, 2023 · 27 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kavimuru
Copy link

kavimuru commented Apr 30, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open the app
  2. Open any report
  3. Hover on any message, click on add reaction icon
  4. Click on ESC to close the reaction emoji picker and observe that hover options are stuck

Expected Result:

App should close hover options on closing of reaction emoji picker using ESC

Actual Result:

App does not make hover options disappear on closing of reaction emoji picker using ESC

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.8.8
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
Notes/Photos/Videos: Any additional supporting documentation

hover.options.are.stuck.on.esc.on.emoji.picker.mp4
Recording.429.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1682846464126799

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b7439ae60dd82f6f
  • Upwork Job ID: 1654062698287190016
  • Last Price Increase: 2023-05-11
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 30, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Apr 30, 2023

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

@hoangzinh
Copy link
Contributor

hoangzinh commented May 1, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Hover options are stuck when we close the reaction emoji picker using ESC

What is the root cause of that problem?

  1. We already set onModalHide and onClose prop to EmojiPicker modal. But in onClose callback, if isNavigation param is true, it will make onModalHide callback do nothing. It's added since this PR navigate to Search page after fully closing modal on keyboard shortcut #16381
  2. We setup ESC hotkey logic here, which will call Modal.onClose => In this action, it will call onClose callback with isNavigation is true by default. According to 1), it will make onModalHide callback do nothing. That means it won't trigger the logic that already set here to close context menu.

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

We can apply logic that this PR #16381 added for Modal.onClose, which receives a callback and a boolean isNavigation false in this line

ModalActions.close();

More details, replace above line by:

ModalActions.close(KeyboardShortcutsActions.hideKeyboardShortcutModal, false);

Moreover, we should do the same for hotkey that opens KeyboardShortcutModal, which is CMD+J in this line

@MelvinBot
Copy link

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@dylanexpensify
Copy link
Contributor

Didn't get to this today due to focusing on ECUK and CPM tasks! Will review tomorrow!

@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label May 4, 2023
@melvin-bot melvin-bot bot changed the title Hover options are stuck when we close the reaction emoji picker using ESC [$1000] Hover options are stuck when we close the reaction emoji picker using ESC May 4, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~01b7439ae60dd82f6f

@MelvinBot
Copy link

Current assignee @dylanexpensify is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 4, 2023
@MelvinBot
Copy link

Triggered auto assignment to @Julesssss (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@getusha
Copy link
Contributor

getusha commented May 5, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Mini context is staying still after we close reaction emoji picker using Escape key

What is the root cause of that problem?

there is currently a state called this.state.shouldKeepOpen and as its name suggests if this state is set to true the context menu will be visible even if the Message item is not hovered.

return (this.props.isVisible || this.state.shouldKeepOpen) && (

the state shouldKeepOpen is being updated to false when the modal closes and we have a callback being passed as close.

close: () => this.setState({shouldKeepOpen: false}),

But when using the shortcut there is no callback to update the shouldKeepOpen state to false when the emoji picker closes.

const closeShortcutEscapeModalConfig = CONST.KEYBOARD_SHORTCUTS.ESCAPE;
this.subscribedOpenModalShortcuts.push(KeyboardShortcut.subscribe(closeShortcutEscapeModalConfig.shortcutKey, () => {
ModalActions.close();
KeyboardShortcutsActions.hideKeyboardShortcutModal();
}, closeShortcutEscapeModalConfig.descriptionKey, closeShortcutEscapeModalConfig.modifiers, true, true));

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

We should set a onClose callback () => this.setState({shouldKeepOpen: false}) inside src/libs/actions/Modal.js to be called when the emoji picker modal closes. it will insure to update the shouldKeepOpen state when the emoji picker is closed.

Screen.Recording.2023-05-05.at.5.32.53.AM.mov

What alternative solutions did you explore? (Optional)

@dylanexpensify
Copy link
Contributor

Didn't get to this today due to prioritizing Payroll, CPM, ECUK items! Will review Monday!

@dylanexpensify
Copy link
Contributor

@0xmiroslav can we get a review on proposal please? 🙇‍♂️

@melvin-bot melvin-bot bot added the Overdue label May 8, 2023
@dylanexpensify
Copy link
Contributor

Melvin, I just posted above!

@melvin-bot melvin-bot bot removed the Overdue label May 8, 2023
@thesahindia
Copy link
Member

It looks like it got fixed because I couldn't repro it on main/staging. It was only reproducible at prod.

@hoangzinh
Copy link
Contributor

you're right @thesahindia . The logic that cause this bug has been refactored/fixed in this PR #18425.

@thesahindia
Copy link
Member

Thanks for the confirmation @hoangzinh!

@thesahindia
Copy link
Member

@dylanexpensify, I think we can close this issue. The fix is on staging right now.

@dhanashree-sawant
Copy link

Hi @thesahindia , @dylanexpensify, the bug whose PR helped to fix this issue was raised after this bug so will I be eligible for reporting bonus?

@thesahindia
Copy link
Member

Ahh forgot about that.

the bug whose PR helped to fix this issue was raised after this bug so will I be eligible for reporting bonus?

As far as I know it should be eligible since it was a valid bug.

@melvin-bot melvin-bot bot added the Overdue label May 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 11, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot
Copy link

melvin-bot bot commented May 11, 2023

@Julesssss, @dylanexpensify, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot
Copy link

melvin-bot bot commented May 14, 2023

@Julesssss @dylanexpensify @thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@dylanexpensify
Copy link
Contributor

Coming back from OOO! @dhanashree-sawant can you please apply to the job so I can pay out the reporting bonus? 😄

@melvin-bot melvin-bot bot removed the Overdue label May 15, 2023
@dhanashree-sawant
Copy link

Thanks @dylanexpensify, I have just applied.

@melvin-bot melvin-bot bot added the Overdue label May 17, 2023
@dylanexpensify
Copy link
Contributor

Nice! Sending payment now!

@melvin-bot melvin-bot bot removed the Overdue label May 18, 2023
@dylanexpensify
Copy link
Contributor

offer sent @dhanashree-sawant!

@dylanexpensify
Copy link
Contributor

All done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

8 participants