You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$500] Chat - When pressing the left/right arrow keys after typing '@', the text selection does not move #39102
Issue found when validating #38383 Version Number: 1.4.57-2 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):abebemiherat@gmail.com Issue reported by: Applause - Internal Team
Action Performed:
1, Open any chat
2, Type a mention to open up the mention suggestion
3, Press the left/right arrow key
4, Observe that the text selection does not move to the left/right
Expected Result:
when right left arrows are pressed, suggestions highlights should reflect the change corresponding to cursor movement in the compose box as it does with emojis
Actual Result:
when right left arrows are pressed, suggestions highlights are not changing corresponding to cursor movement in the compose box. But it does with emojis.
NOTE: Emoji behavior also shown in the video
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
@stitesExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
@lanitochka17 You might be confused here. The staging behaviour is correct indeed.
Hi @stitesExpensify , I saw your #38383 (comment) here but I think I agree with @shubham1206agra that this should be the expected behaviour. I tried to search old issues to find a regression test to support my point but couldn't find such one.
@lanitochka17 Are you able to search our existing regression tests to see if we have any tests related to this case?
I think QA expects the mention highlight to move along with the text selection (as stated by @stitesExpensify in #38383 (comment)) just like emoji, but because on prod we can't move the selection at all, QA put a deploy blocker.
The highlight of the mention/emoji is based on the prefix props,
the prefix props for mention coming from suggestionValues.mentionPrefix which contains the text after @, however, to correctly update the highlight of the suggestion, the prefix should consider the selection position, just like we did with emoji suggestion.
@bernhardoj I got your point. Hmm, I just feel that it also makes sense to capture valid prefix as longer as possible. But, yes, it's definitely better to make the behaviour consistent between emoji and mention.
@stitesExpensify Can you help to add BZ here to handle the payment? I think it's due for payment. Maybe add a Bug label will help to trigger the process.
[@eh2077] 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: N/A
[@eh2077] Determine if we should create a regression test for this bug. No. Because this is a minor case and it's caught by QA
Activity
github-actions commentedon Mar 27, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Mar 27, 2024
Triggered auto assignment to @stitesExpensify (
Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.lanitochka17 commentedon Mar 27, 2024
Production:
Recording.1497.mp4
lanitochka17 commentedon Mar 27, 2024
@stitesExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
lanitochka17 commentedon Mar 27, 2024
We think that this bug might be related to #vip-vsp
shubham1206agra commentedon Mar 28, 2024
@lanitochka17 You might be confused here. The staging behaviour is correct indeed.
eh2077 commentedon Mar 29, 2024
Hi @stitesExpensify , I saw your #38383 (comment) here but I think I agree with @shubham1206agra that this should be the expected behaviour. I tried to search old issues to find a regression test to support my point but couldn't find such one.
@lanitochka17 Are you able to search our existing regression tests to see if we have any tests related to this case?
bernhardoj commentedon Mar 29, 2024
I think QA expects the mention highlight to move along with the text selection (as stated by @stitesExpensify in #38383 (comment)) just like emoji, but because on prod we can't move the selection at all, QA put a deploy blocker.
The highlight of the mention/emoji is based on the
prefixprops,App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx
Line 323 in 5a8cb7f
the
prefixprops for mention coming fromsuggestionValues.mentionPrefixwhich contains the text after@, however, to correctly update the highlight of the suggestion, theprefixshould consider the selection position, just like we did with emoji suggestion.App/src/pages/home/report/ReportActionCompose/SuggestionEmoji.tsx
Line 230 in 5a8cb7f
For mention suggestion, the
prefixtries to contain the whole string. (notice theleftString)App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx
Lines 225 to 234 in 5a8cb7f
We can update it to always use
selectionEnd(or selectionStart, there is currently inconsistencies on the selection usage, even on emoji suggestion)But this will cause this issue again where the suggestion won't show if we type
@@and put the selection between the@,@|@.And that's because we check whether the cursor is before a mention code (@)
App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx
Lines 264 to 266 in 5a8cb7f
We should remove it as we already update the
leftStringto slice it only untilselectionEnd.If we want to fix it, I can create a proposal.
eh2077 commentedon Mar 29, 2024
@bernhardoj I got your point. Hmm, I just feel that it also makes sense to capture valid prefix as longer as possible. But, yes, it's definitely better to make the behaviour consistent between emoji and mention.
lanitochka17 commentedon Mar 29, 2024
@eh2077 I'll look again, but so far I don't see any TC related to this issue.
35 remaining items
eh2077 commentedon May 3, 2024
@stitesExpensify Can you help to add BZ here to handle the payment? I think it's due for payment. Maybe add a
Buglabel will help to trigger the process.melvin-bot commentedon May 3, 2024
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.stitesExpensify commentedon May 3, 2024
Hi @kadiealexander ! The work here is done, we just need to pay :)
melvin-bot commentedon May 10, 2024
@stitesExpensify, @bernhardoj, @kadiealexander, @eh2077 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
eh2077 commentedon May 13, 2024
@kadiealexander This issue is due for payment. Can you help with it?
eh2077 commentedon May 13, 2024
Checklist
melvin-bot commentedon May 20, 2024
@stitesExpensify, @bernhardoj, @kadiealexander, @eh2077 Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon May 22, 2024
@stitesExpensify, @bernhardoj, @kadiealexander, @eh2077 Eep! 4 days overdue now. Issues have feelings too...
eh2077 commentedon May 22, 2024
Not overdue, this is waiting for payment.
cc @kadiealexander
kadiealexander commentedon May 27, 2024
Payouts due:
Upwork job is here.