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-09-27] [$500] Workspaces - Auto select member after invite #26667

Closed
1 of 6 tasks
izarutskaya opened this issue Sep 4, 2023 · 28 comments
Closed
1 of 6 tasks
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

@izarutskaya
Copy link

izarutskaya commented Sep 4, 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. Create a WS
  2. Go to members and invite some members (about 3 members)
  3. Select 1 member
  4. Click invite again and search new member
  5. Press enter some times (important: about 3-4 times)
  6. Click member to invite
  7. Click next
  8. Click invite, observe some members was selected.

Expected Result:

No select member after invite

Actual Result:

auto select member after invite

Workaround:

Unknown

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: v1.3.62-4

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

Screen.Recording.2023-08-25.At.20.47.37.mp4
bandicam.2023-09-04.19-29-39-215.mp4

Expensify/Expensify Issue URL:

Issue reported by: @namhihi237

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692971244708429

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011a838c373f60f807
  • Upwork Job ID: 1700169777562968064
  • Last Price Increase: 2023-09-08
  • Automatic offers:
    • bernhardoj | Contributor | 26648637
    • namhihi237 | Reporter | 26648640
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@melvin-bot
Copy link

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

@bernhardoj
Copy link
Contributor

Proposal

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

Pressing enter in the workspace invite message page and select the member in the members' page.

What is the root cause of that problem?

Both workspace members and invite member pages use SelectionList to show the list. SelectionList subscribe to enter key to select/toggle the member selection. When the screen is out of focus, in this case, we go to the invite message page, the keyboard subscription is still active.

/** Selects row when pressing Enter */
useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.ENTER, selectFocusedOption, {
captureOnInputs: true,
shouldBubble: () => !flattenedSections.allOptions[focusedIndex],
isActive: !activeElement,
});
/** Calls confirm action when pressing CTRL (CMD) + Enter */
useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.CTRL_ENTER, onConfirm, {
captureOnInputs: true,
shouldBubble: () => !flattenedSections.allOptions[focusedIndex],
isActive: Boolean(onConfirm),
});

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

In OptionsSelector, we already have a fix to unsubscribe the enter listener when the screen is out of focus, so we can apply the same solution.

if (prevProps.isFocused !== this.props.isFocused) {
if (this.props.isFocused) {
this.subscribeToKeyboardShortcut();
} else {
this.unSubscribeFromKeyboardShortcut();
}
}

In SelectionList, use useIsFocused hook to get the screen focus state and use it to disable the keyboard listener here:

useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.ENTER, selectFocusedOption, {
captureOnInputs: true,
shouldBubble: () => !flattenedSections.allOptions[focusedIndex],
isActive: !activeElement,
});

isActive: !activeElement && isFocused

@michaelhaxhiu michaelhaxhiu added the External Added to denote the issue can be worked on by a contributor label Sep 8, 2023
@melvin-bot melvin-bot bot changed the title Workspaces - Auto select member after invite [$500] Workspaces - Auto select member after invite Sep 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

Job added to Upwork: https://www.upwork.com/jobs/~011a838c373f60f807

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

melvin-bot bot commented Sep 8, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

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

@michaelhaxhiu
Copy link
Contributor

@sobitneupane we have 1 proposal from @bernhardoj above already ☝️ 😄

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

@michaelhaxhiu, @anmurali, @sobitneupane Whoops! This issue is 2 days overdue. Let's get this updated quick!

@sobitneupane
Copy link
Contributor

will review the proposal shortly.

@melvin-bot melvin-bot bot removed the Overdue label Sep 12, 2023
@sobitneupane
Copy link
Contributor

Proposal from @bernhardoj looks good to me.

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

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

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

melvin-bot bot commented Sep 13, 2023

📣 @sobitneupane Please request via NewDot manual requests for the Reviewer role ($500)

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Sep 13, 2023
@bernhardoj
Copy link
Contributor

PR is ready

cc: @sobitneupane

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

🎯 ⚡️ Woah @sobitneupane / @bernhardoj, 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 @bernhardoj got assigned: 2023-09-13 08:28:51 Z
  • when the PR got merged: 2023-09-15 10:50:07 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 Sep 20, 2023
@melvin-bot melvin-bot bot changed the title [$500] Workspaces - Auto select member after invite [HOLD for payment 2023-09-27] [$500] Workspaces - Auto select member after invite Sep 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.71-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-09-27. 🎊

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 Sep 20, 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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] 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:
  • [@sobitneupane] 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:
  • [@sobitneupane] Determine if we should create a regression test for this bug.
  • [@sobitneupane] 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.
  • [@michaelhaxhiu / @anmurali] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@sobitneupane
Copy link
Contributor

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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

BaseSelectionList was refactored in this PR. It started the use of useKeybaordShortcut hook. But I believe the problem exists prior to the refactoring.

  • [@sobitneupane] 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:
  • [@sobitneupane] 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:

https://expensify.slack.com/archives/C049HHMV9SM/p1695617530071679

  • [@sobitneupane] Determine if we should create a regression test for this bug.

Yes.

  • [@sobitneupane] 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.

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Open Settings > Workspaces > Select any workspace > Members > Invite
  2. Select one user to invite and press Next
  3. Press CTRL/CMD+Enter
  4. Verify the text input is still focused
  5. Press anywhere to blur the text input
  6. Press Enter multiple times
  7. Go back
  8. Verify the selected user does not change

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 26, 2023
@michaelhaxhiu
Copy link
Contributor

michaelhaxhiu commented Sep 27, 2023

Nice job! Let's pay this now.

@michaelhaxhiu
Copy link
Contributor

@sobitneupane let us know after you request payment please, so I can close this GH :)

@michaelhaxhiu michaelhaxhiu removed their assignment Sep 28, 2023
@michaelhaxhiu michaelhaxhiu added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

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

@michaelhaxhiu
Copy link
Contributor

I'm re-assigning this to another BZ as part of my preparation for Sabbatical (starting Friday).

Next steps:

  • Wait for @sobitneupane to confirm he requested payment and received it.
  • Close this GH

@Expensify Expensify deleted a comment from melvin-bot bot Sep 28, 2023
@joekaufmanexpensify
Copy link
Contributor

@sobitneupane tracks these in his end, so no need to leave this one open for now. We just need to issue payment once he requests it!

@sobitneupane
Copy link
Contributor

#26667 (comment)

Requested payment on newDot.

@JmillsExpensify
Copy link

$750 payment approved for @sobitneupane based on BZ summary.

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