-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-05-29] [$1000] Contact suggestion focus/selection does not reset after selecting a contact #18844
Comments
Triggered auto assignment to @isabelastisser ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPosting proposal early as per new guidelines Please re-state the problem that we are trying to solve in this issue.Contact suggestion focus/selection does not reset after selecting a contact. What is the root cause of that problem?When we press enter it will run this code. App/src/pages/home/report/ReportActionCompose.js Lines 749 to 758 in 101a3e2
We can see we are not resetting the index after suggesting. This is the root cause of the problem. What changes do you think we should make in order to solve the problem?We have to reset index as shown in code below i.e. if ((e.key === CONST.KEYBOARD_SHORTCUTS.ENTER.shortcutKey || e.key === CONST.KEYBOARD_SHORTCUTS.TAB.shortcutKey) && suggestionsExist) {
e.preventDefault();
if (this.state.suggestedEmojis.length > 0) {
this.insertSelectedEmoji(this.state.highlightedEmojiIndex);
}
if (this.state.suggestedMentions.length > 0) {
this.insertSelectedMention(this.state.highlightedMentionIndex);
this.setState({highlightedMentionIndex: 0}); // *** Add this
}
return;
} This will solve the issue as shown in result video. What alternative solutions did you explore? (Optional)If we have to match code similar to emoji suggestion then we have to add App/src/pages/home/report/ReportActionCompose.js Lines 541 to 545 in 101a3e2
So updated code looks as under const nextState = {
suggestedMentions: [],
highlightedMentionIndex: 0, // *** ADD THIS ***
atSignIndex,
mentionPrefix: prefix,
}; This will also solve the issue and give same results. Result18844-MentionHighlight.mov |
I won't be able to act on this until next Tuesday (Compliance deadlines), reassigning! |
Triggered auto assignment to @alexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
I started an internal discussion here: https://expensify.slack.com/archives/C049HHMV9SM/p1683994795740649?thread_ts=1683803719.905009&cid=C049HHMV9SM |
Job added to Upwork: https://www.upwork.com/jobs/~013072759f95d2c09f |
Current assignee @alexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Triggered auto assignment to @amyevans ( |
I confirmed this is a bug and I can replicate it. With that said, the team confirmed the expectations:
For now, I'm marking it as |
Thanks for confirming it @alexpensify. I think we should use @PrashantMangukiya's alternative approach of resetting it in @amyevans All yours. |
@mananjadhav Sorry for my lateness but I see that the selected proposal is not exhaustive and it doesn't cover all cases ProposalPlease re-state the problem that we are trying to solve in this issue.Contact suggestion focus/selection does not reset after selecting a contact What is the root cause of that problem?We don't reset suggestion in both calculateMentionSuggestion function and insertSelectedMention function What changes do you think we should make in order to solve the problem?For consistency with emoji suggestion App/src/pages/home/report/ReportActionCompose.js Lines 497 to 505 in 6c10bb2
B. calculateMentionSuggestion App/src/pages/home/report/ReportActionCompose.js Lines 544 to 548 in 6c10bb2
So that, on
What alternative solutions did you explore? (Optional)If we want to remain highlightedMentionIndex when the user changes the selection, we can set Additional BugI mentioned it here because it relates to the original issue and the original issue is so straightforward. So I think we should fix this issue What is the root cause of that problem?App/src/pages/home/report/ReportActionCompose.js Lines 517 to 520 in 6c10bb2
We don’t reset suggestions when this.state.selection.end < 1 Solution for Additional Bugwhen this.state.selection.end < 1, we should call this.resetSuggestions() UpdatedI just see that the additional bug is created here: #18879 |
My proposed solution and root cause analysis is according to the expected result of the issue and solves the problem. So technically my proposal is complete according to the expected result. There could be many ways to suggest additional changes with proposal, but if I did not suggest additional changes it doesn't mean that my proposal is incomplete. During PR review time we can do other adjustment if decided by reviewer team. Also if any additional bug is found then there is a procedure to report that bug on Slack and then move forward. By just mentioning that bug and solution in a proposal with current issue does not mean that other proposals are incomplete. This is just my understanding. I am happy with whatever decision taken by C+ member. cc: @mananjadhav |
I mentioned an additional bug here because I see a similar thing in this issue |
@amyevans and @mananjadhav - any feedback here? |
Hiring @PrashantMangukiya, you can get a PR started please! |
I don't think so, that happens once the PR is deployed to production and this one is only on staging at the moment! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.16-7 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-05-29. 🎊 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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
@johncschuster and @dylanexpensify - I appreciate your help here! I'm back online and removing your assignment. |
@mananjadhav - when you get a chance can you please fill out the checklist: #18844 (comment) Thanks! |
@mananjadhav, @PrashantMangukiya, and @Nathan-Mulugeta - To prepare for the payment date, please apply to the job in Upwork: https://www.upwork.com/jobs/~013072759f95d2c09f Thanks! |
@alexpensify Can you please invite me for the job. I have not enough Upwork connect balance to apply. This is my Upwork profile https://www.upwork.com/freelancers/~01c718889ed7821f82 Thank you for your time. |
We added the Mentions support in this PR #18469, where we didn't reset the index. I don't see any need for a regression test, nor updating the checklist. This can be categorized as missing test case/mistake. I've commented on the offending PR to let the contributors know. @amyevans do you think we need a regression test here? |
Thank you for that update @mananjadhav! |
@alexpensify this is ready for payout. |
No I think we're fine without. |
Sorry, I should have flagged that I was offline yesterday for the US Bank Holiday but most of the team was offline too. I will work on the payment process today. |
Flagging the urgency bonus here: #18844 (comment) |
Alright, it's payment time-- ring the bell! @mananjadhav, @PrashantMangukiya, and @Nathan-Mulugeta - please accept in Upwork and I can complete the payment process. Thanks! |
@alexpensify Offer accepted on Upwork. |
Just accepted offer @alexpensify |
Alright, @mananjadhav, @PrashantMangukiya, and @Nathan-Mulugeta have been paid via Upwork. Great work here, the job is closed now! |
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:
Expected behavior:
The contact suggestion selection should start from the first contact again
Actual behavior:
The contact suggestion selection remains on the previously selected contact
NOTE : This behavior is inconsistent with the emoji suggestion functionality (video attached)
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?
Version Number: 1.3.13.0
Reproducible in staging?: y
Reproducible in production?:
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
2023-05-11.14.16.35.mp4
2023-05-11.14.10.18.mp4
Recording.575.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1683803719905009
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: