-
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 2024-04-05] HIGH: [Mentions] [$500] Pressingright
arrow key does nothing when mentioning and keeping the cursor after @
in the compose box
#38076
Comments
Triggered auto assignment to @bfitzexpensify ( |
right
arrow key does nothing when mentioning and keeping the cursor after @
in the compose boxright
arrow key does nothing when mentioning and keeping the cursor after @
in the compose box
Job added to Upwork: https://www.upwork.com/jobs/~01e5a6db314206cef2 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 ( |
right
arrow key does nothing when mentioning and keeping the cursor after @
in the compose boxright
arrow key does nothing when mentioning and keeping the cursor after @
in the compose box
ProposalPlease re-state the problem that we are trying to solve in this issue.Pressingrightarrow key does nothing when mentioning and keeping the cursor after @ in the compose box What is the root cause of that problem?We are using
What changes do you think we should make in order to solve the problem?Pass const [highlightedMentionIndex, setHighlightedMentionIndex] = useArrowKeyFocusManager({
isActive: isMentionSuggestionsMenuVisible,
maxIndex: suggestionValues.suggestedMentions.length - 1,
shouldExcludeTextAreaNodes: false,
disableHorizontalKeys: true,
}); We need to do the same for the emoji suggestions also.
Result |
ProposalPlease re-state the problem that we are trying to solve in this issue.Pressing right arrow key does nothing when mentioning and keeping the cursor after @ in the compose box What is the root cause of that problem?We actually have a very confusing condition in App/src/hooks/useArrowKeyFocusManager.ts Line 46 in 9447937
Then in App/src/hooks/useArrowKeyFocusManager.ts Lines 58 to 61 in 9447937
What changes do you think we should make in order to solve the problem?To avoid confusion and have literal meaning of the variable i propose that we set the default value of Then update the const horizontalArrowConfig = useMemo(
() => ({
excludedNodes: shouldExcludeTextAreaNodes ? ['TEXTAREA'] : [],
isActive: isActive && disableHorizontalKeys, With the we have the understanding of variable name a lot clear. Now in What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Can't use left/right arrow key to change the selection position when a mention suggestion appears. What is the root cause of that problem?In the suggestion component, we use an arrow key manager hook to manage the arrow key, including left and right arrow key. App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx Lines 53 to 57 in b8590c9
It will be active when the suggestion is visible. So, when the suggestion is visible all arrow keys are captured by the hook (keyboard shortcut). What changes do you think we should make in order to solve the problem?We already have a way to disable the horizontal key with App/src/hooks/useArrowKeyFocusManager.ts Lines 58 to 61 in b8590c9
but instead of disabling it case by case, we should disable it whenever the component doesn't support horizontal arrow navigation, with the help of
App/src/hooks/useArrowKeyFocusManager.ts Line 48 in b8590c9
|
Few proposals ready for review @eh2077 |
@bfitzexpensify Yeah, reviewing proposals |
Thank you all for your proposals! While all proposals are similar, I'm inclined to go with @Krishna2323 proposal as it first identified the root cause and provided the solution. 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @tgolen, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I had a look at all the proposals, and I'm not convinced yet that any of them is a good 100% solution. I'd like to ask a couple of questions to make sure I am understanding it correctly first:
I think some of the proposals touched on this being a bit confusing (and I agree), so let's take the time to really clean this up and make it clear. |
Popover menu, emoji picker, attachment picker menu, report context menu, emoji & mention suggestion. Only emoji picker that uses
I would say we should disable it if App/src/hooks/useArrowKeyFocusManager.ts Lines 171 to 174 in 92ad1cd
I think we can consolidate it by having a single prop called Then in the emoji picker, we will set
If other component needs the horizontal navigation, they just need to use |
OK, that really helps. Thank you! I agree with all that you said, and I accept that as a modified proposal if @eh2077 agrees. Regarding |
@tgolen, I agree that it would be better to do some modifications but my solution also does work correctly without any issue and |
Yep, I understand that and I appreciate that you had a nice and simple proposal. I am a pretty firm believer in leaving code in a better place than it was found, so I always appreciate when someone spots something that is confusing and then takes the time to clean it up and make it better. |
@tgolen , @bernhardoj pretty much explained all your doubts, i have almost similar explanation, an i was the one to point out the confusing names, so do i need to answer your questions still and where do we proceed from here |
@tgolen, agree with you on making the code better but that could have in handled in the PR phase since I pointed out the correct root cause and a valid solution. We generally do handle these things in the PR. |
@tgolen Thanks for sharing your thoughts. Yes, I agree with you that we should not only fix it but also clean up the confusing part. The root cause of this issue is clear. @Krishna2323 first proposed a quick fix solution, while @GandalfGwaihir was the first to point out the confusing prop I also agree we should go with @bernhardoj 's proposal, along with their follow-up #38076 (comment), as they provided a consolidated solution to get the code cleaner. @tgolen All yours. 🎀👀🎀 C+ reviewed Sorry for the back and forth! |
Current assignee @tgolen is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
PR is ready cc: @eh2077 |
Hi! What's the next step on this, who is doing it, and when will it be done? /cc @eh2077 |
@tgolen what's the ETA on this? |
@tgolen was OOO, the last time i checked |
right
arrow key does nothing when mentioning and keeping the cursor after @
in the compose boxright
arrow key does nothing when mentioning and keeping the cursor after @
in the compose box
right
arrow key does nothing when mentioning and keeping the cursor after @
in the compose boxright
arrow key does nothing when mentioning and keeping the cursor after @
in the compose box
Hm, why isn't this closed? this was merged a while ago, has it not yet deployed for some reason? |
It was only merged 3 days ago, so it's still waiting to be deployed it looks like. It's in the current deploy checklist, so it should go out soon: #39033 |
right
arrow key does nothing when mentioning and keeping the cursor after @
in the compose boxright
arrow key does nothing when mentioning and keeping the cursor after @
in the compose box
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.57-5 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 2024-04-05. 🎊 For reference, here are some details about the assignees on this 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:
|
Payment Summary
BugZero Checklist (@bfitzexpensify)
|
Checklist
Regression test steps:
Do you agree with the above test? 👍 or 👎 |
Thanks @eh2077 - agree with those testing steps, and proposed they be added to TestRail in https://github.com/Expensify/Expensify/issues/386521. Can you please accept the Upwork job and I'll pay it out and then close this issue out as complete? |
@bfitzexpensify Hmm, it's weird that I failed to accept this offer. Can you withdraw it and send me another one? |
Weird. OK, just re-sent the offer. |
@bfitzexpensify Accepted, thank you! |
Paid out! Ok, we're all done here, thanks everyone. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.50-2
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
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1710108211692399
Action Performed:
Hello @applausetester+mn03@applause.expensifail.com
@
Expected Result:
Should be able to move to next character
Actual Result:
Pressing "right arrow" does nothing and it stucks there
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Recording.2835.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @bfitzexpensifyThe text was updated successfully, but these errors were encountered: