App: [HOLD for payment 2023-10-09] [$500] After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list)
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:
- sign-out if you are logged in.
- press
cmd+jto open shortcut modal without page reload. - now you see list off all shortcuts in modal.
Expected Result:
only ESC and Shortcut(" CMD+J") keys should be shown
Actual Result:
All Shortcuts are shown here Platforms: MacOS / Chrome / Safari
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.64-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 Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/86624327-4448-4829-91a5-9ac15b28895b
Expensify/Expensify Issue URL: Issue reported by: @Charan-hs Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692612279461809
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~0124cd08463cfd5f26
- Upwork Job ID: 1699578589047709696
- Last Price Increase: 2023-09-15
- Automatic offers:
- ntdiary | Reviewer | 26826364
- Charan-hs | Contributor | 26826367
- Charan-hs | Reporter | 26826368
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 49 (32 by maintainers)
I agree with holding this; the result will be better after merging the PR on #26809.
@Charan-hs - paying now. For future reference, there’s no need to submit work for review. Thanks!
Not a regression, just a tiny feature polish, don’t need a regression test. : )
🎯 ⚡️ Woah @ntdiary / @Charan-hs, great job pushing this forwards! ⚡️
The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀
I don’t know why I was auto-assigned to the PR 🤔
@jasperhuangg I unassigned myself and assigned you as the reviewer of the PR 🙇
📣 @Charan-hs 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job
📣 @Charan-hs 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
Their proposal makes sense to me! Assigned
@Charan-hs it’ll be @jasperhuangg who assigns you, not me!
@Charan-hs’s proposal makes sense to me, I think we can move forward with their proposal. : )
🎀 👀 🎀 C+ reviewed
Hi, @Charan-hs, perhaps we can just use
delete documentedShortcuts[displayName]. Also, some small questions:eventHandlers[displayName]is array, do we need to distinguish who added the value todocumentedShortcuts?FYI, It seems that using just
delete documentedShortcuts[displayName]works well too.@jliexpensify this PR https://github.com/Expensify/App/pull/26809 is merged and deployed.
I think this is a call for @ntdiary and @mollfpr to make!
@ishpaul777 Thank you for bringing this to our attention. However, I would like to inform you that this issue is already being addressed and worked on at the moment.https://github.com/Expensify/App/issues/25448
Proposal by @Charan-hs
Please re-state the problem that we are trying to solve in this issue.
All keyboard shortcut shows up in modal after Logout
What is the root cause of that problem?
When we are logged in or logged out we are unsubscribing the event handlers here. https://github.com/Expensify/App/blob/fdcae9ff99696a1ac6068efbfe8927e1bcf108b7/src/libs/KeyboardShortcut/index.js#L83-L87 but When unsubscribing, we remove event listeners but not shortcuts from the variable
documentedShortcuts. Even though I have unsubscribed, the shortcuts are still present indocumentedShortcuts.What changes do you think we should make in order to solve the problem?
Here, https://github.com/Expensify/App/blob/fdcae9ff99696a1ac6068efbfe8927e1bcf108b7/src/libs/KeyboardShortcut/index.js#L83-L87 When unsubscribed we can remove the values present in
documentedShortcutsbydisplayname(key).What alternative solutions did you explore? (Optional)