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

[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) #26829

Closed
1 of 6 tasks
kavimuru opened this issue Sep 5, 2023 · 49 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Sep 5, 2023

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. sign-out if you are logged in.
  2. press cmd+j to open shortcut modal without page reload.
  3. 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

with.bug.shortcut.mp4

Snip - New Expensify - Google Chrome (5)

Expensify/Expensify Issue URL:
Issue reported by: @Charan-hs
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692612279461809

View all open jobs on GitHub

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
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 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

@kavimuru
Copy link
Author

kavimuru commented Sep 5, 2023

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.

*/
function unsubscribe(displayName, callbackID) {
eventHandlers[displayName] = _.reject(eventHandlers[displayName], (callback) => callback.id === callbackID);
}

but When unsubscribing, we remove event listeners but not shortcuts from the variable documentedShortcuts. Even though I have unsubscribed, the shortcuts are still present in documentedShortcuts.

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

Here,

*/
function unsubscribe(displayName, callbackID) {
eventHandlers[displayName] = _.reject(eventHandlers[displayName], (callback) => callback.id === callbackID);
}

When unsubscribed we can remove the values present in documentedShortcuts by displayname (key).

    lodashUnset(documentedShortcuts,displayName);
//or
    documentedShortcuts = _.omit(documentedShortcuts,displayName);
//or
   documentedShortcuts[displayName] = {} // here we can return null or {}
//We can use the delete method also based on your request.

What alternative solutions did you explore? (Optional)

@jliexpensify
Copy link
Contributor

Able to repro!

@jliexpensify jliexpensify changed the title All keyboard shortcut shows up in modal after Logout After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list) Sep 6, 2023
@jliexpensify
Copy link
Contributor

@Charan-hs @kavimuru I am confused at this issue. Here is what you've written:

Expected Result:
only ESC and Shortcut(" CMD+J") keys should be shown

Actual Result:
All Shortcuts are shown here

Should these 2 be reversed? i.e. when you're logged in, you see all the shortcuts, but when you're logged out, you only see 2 shortcuts. or are yousaying we should only ever see 2 shortcuts? (which doesn't sound right to me)

@ishpaul777
Copy link
Contributor

ishpaul777 commented Sep 6, 2023

@jliexpensify, I think there are 2 bugs here -

  1. after signing out all shortcut list shows in modal, if page reloaded and then only ESC and Shortcut(" CMD+J") options be shown, here as far as i know showing only 2 options is intententional why would we show other options if shortcut does nothing when used?

Not reported here but i noticed, i believe can be handled with this issue.
2. when reloaded and first time open shortcut modal with CTRL + j only one option shown, closing and reopening modal shows 2 options.

Screen.Recording.2023-09-06.at.11.55.25.PM.mov

@jliexpensify
Copy link
Contributor

@ishpaul777 thanks for reporting this one:

  1. when reloaded and first time open shortcut modal with CTRL + j only one option shown, closing and reopening modal shows 2 options.

I also noticed this in my testing!

After chatting to @kadiealexander I think I got confused initially, so ignore this comment! Going to mark this as external, and I think we should also fix the 2nd issue outlined above.

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 7, 2023
@melvin-bot melvin-bot bot changed the title After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list) [$500] After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list) Sep 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 7, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0124cd08463cfd5f26

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

melvin-bot bot commented Sep 7, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 7, 2023

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

@Charan-hs
Copy link
Contributor

@jliexpensify, The expected and actual results are based on the logged-out page. This means that when a user signs in, they should be able to see all keyboard shortcuts, such as Ctrl+k for opening the search dialogue. If the user logs out, some of the keyboard shortcuts are unsubscribed, but the keyboard shortcut modal is not updated accordingly.

@Charan-hs
Copy link
Contributor

@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.#25448

@Charan-hs
Copy link
Contributor

@jliexpensify we should keep this hold till #26809 is merged
Any suggestions?
Cc: @mollfpr

@jliexpensify
Copy link
Contributor

I think this is a call for @ntdiary and @mollfpr to make!

@mollfpr
Copy link
Contributor

mollfpr commented Sep 7, 2023

I agree with holding this; the result will be better after merging the PR on #26809.

@jliexpensify jliexpensify changed the title [$500] After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list) [HOLD FOR #26809][$500] After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list) Sep 7, 2023
@jliexpensify jliexpensify added Weekly KSv2 and removed Daily KSv2 labels Sep 7, 2023
@jliexpensify
Copy link
Contributor

Cool, thanks! On hold now - please ping me when you want this off hold.

@Charan-hs
Copy link
Contributor

@jliexpensify this PR #26809 is merged and deployed.

@melvin-bot melvin-bot bot added the Overdue label Sep 15, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 23, 2023

📣 @ntdiary 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Sep 23, 2023

📣 @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 📖

@melvin-bot
Copy link

melvin-bot bot commented Sep 23, 2023

📣 @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
Copy link
Contributor

@ntdiary PR is ready for Review #28053 but this PR is auto-assigned to @hayata-suenaga

@hayata-suenaga
Copy link
Contributor

hayata-suenaga commented Sep 24, 2023

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 🙇

@melvin-bot
Copy link

melvin-bot bot commented Sep 27, 2023

🎯 ⚡️ 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 🎉

  • when @Charan-hs got assigned: 2023-09-23 01:48:12 Z
  • when the PR got merged: 2023-09-27 00:21:41 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 2, 2023
@melvin-bot melvin-bot bot changed the title [$500] After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list) [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) Oct 2, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.75-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-09. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@ntdiary] The PR that introduced the bug has been identified. Link to the PR:
  • [@ntdiary] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@ntdiary] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@ntdiary] Determine if we should create a regression test for this bug.
  • [@ntdiary] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@jliexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@jliexpensify
Copy link
Contributor

Payment Summary:

  • Reporter / Contributor: @Charan-hs $50 + $500 + $250 = $800
  • C+: @ntdiary $500 + $250 = $750

Upworks Job

@jliexpensify
Copy link
Contributor

@ntdiary bump to complete the checklist please!

@ntdiary
Copy link
Contributor

ntdiary commented Oct 9, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@ntdiary] The PR that introduced the bug has been identified. Link to the PR: N/A
  • [@ntdiary] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/A
  • [@ntdiary] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: No need
  • [@ntdiary] Determine if we should create a regression test for this bug. No need
  • [@ntdiary] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. No need
  • [@jliexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

Not a regression, just a tiny feature polish, don't need a regression test. : )

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Oct 9, 2023
@jliexpensify
Copy link
Contributor

@Charan-hs - paying now. For future reference, there's no need to submit work for review. Thanks!

@jliexpensify
Copy link
Contributor

Everyone has been paid and job is closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants