-
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 #16078][$1000] Pressing down arrow
key for the 3rd time does not highlight the 1st one of the 2 emoji suggestions and console error clicking Enter
key
#16426
Comments
Triggered auto assignment to @kadiealexander ( |
Bug0 Triage Checklist (Main S/O)
|
I could reproduce, however I didn't get any console errors and I could make the cursor go to the first option using 5 down button presses. 2023-03-23_12-25-00.mp4 |
down arrow
key for the 3rd time does not highlight the 1st one of the 2 emoji suggestions and console error clicking Enter
keydown arrow
key for the 3rd time does not highlight the 1st one of the 2 emoji suggestions and console error clicking Enter
key
Job added to Upwork: https://www.upwork.com/jobs/~011af615711c2a4640 |
Current assignee @kadiealexander is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
Triggered auto assignment to @nkuoch ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The down arrow key does not correctly focus the suggested emojis. What is the root cause of that problem?The root cause of the issue is this line. We're getting an incorrect What changes do you think we should make in order to solve the problem?We can just replace this expression to use A more detailed and readable way of doing the same thing would be to replace this with:
What alternative solutions did you explore? (Optional)None |
ProposalPlease re-state the problem that we are trying to solve in this issue.When there are less than 3 items suggested, there seem to be ghost values for the emoji suggestions that are not highlighted and throw console error when Enter key is clicked. What is the root cause of that problem?In the App/src/pages/home/report/ReportActionCompose.js Lines 126 to 128 in fa31301
What changes do you think we should make in order to solve the problem?By default the maximum amount of emojis that can be suggested is 5, as can be seen here: Line 223 in fa31301
This is called here:
So that is implied and we only need to modify the condition to show a maximum of 3 emojis for smaller screens. A cleaner way to do this would be via this:
|
ProposalPlease re-state the problem that we are trying to solve in this issue.The Up/Down arrow keys does not correctly focus the suggested emojis when suggestion list have fewer that 5 emojis What is the root cause of that problem?ArrowKeyFocusManager's What changes do you think we should make in order to solve the problem?We should pass actual size of emoji suggestion to
maxIndex={this.state.suggestedEmojis.length - 1} |
Please re-state the problem that we are trying to solve in this issue. What is the root cause of that problem? App/src/pages/home/report/ReportActionCompose.js Lines 126 to 128 in fa31301
In this function Math.max() function is used and this method returns the number with the highest value.In this function you are using CONST.EMOJI_SUGGESTER.MAX_AMOUNT_OF_ITEMS that has a static value of 5, so if suggested emojis are 2 or 3 it will always return 5.
What changes do you think we should make in order to solve the problem?
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Up/Down arrow key goes to 5 rows every time even though available suggestions are fewer which causes console error. What is the root cause of that problem?We are not setting the correct maxIndex here for ArrowKeyFocusManager.
What changes do you think we should make in order to solve the problem?We can get rid of the
Conclusion
|
Thank you guys for the proposal! Everyone has all the correct RCA, and I like proposal from @allroundexperts because it has the correct logic and straightforward solution. (Only change the 🎀 👀 🎀 C+ reviewed! cc @nkuoch |
@mollfpr isn't this makes more sense to take out the extra code and simplify it? |
@Pujan92 You have a point. Currently, the behavior on the smaller device is showing 5 emojis. With your proposal, we are only showing 3 emojis. We can wait for @perunt to clarify this. Screen.Recording.2023-03-24.at.19.26.24.mov@allroundexperts I do not recommend creating a PR before you are assigned to the issue. Let's wait @nkuoch first. |
@mollfpr I created the PR on my fork. I'm not sure why it shows up here. |
@allroundexperts Ohyea, sorry I didn't realize that. Probably because you mention the issue. |
Hey guys! I'm working on implementing inline suggestions so that behavior will be changed, so it probably not make sense to make any changes here |
Thanks @perunt, for clarifying this! @nkuoch @kadiealexander Let's hold this and come back after @perunt implementation is done. |
down arrow
key for the 3rd time does not highlight the 1st one of the 2 emoji suggestions and console error clicking Enter
keydown arrow
key for the 3rd time does not highlight the 1st one of the 2 emoji suggestions and console error clicking Enter
key
Current assignee @kadiealexander is eligible for the External assigner, not assigning anyone new. |
Current assignee @mollfpr is eligible for the External assigner, not assigning anyone new. |
Current assignee @grgia is eligible for the External assigner, not assigning anyone new. |
1 similar comment
Current assignee @grgia is eligible for the External assigner, not assigning anyone new. |
@kadiealexander the issue we're holding on is #16078 (still open) I think the title was a typo. I'll update it. |
down arrow
key for the 3rd time does not highlight the 1st one of the 2 emoji suggestions and console error clicking Enter
keydown arrow
key for the 3rd time does not highlight the 1st one of the 2 emoji suggestions and console error clicking Enter
key
🤦 Thanks @grgia!! |
Still on hold. |
Same as above. |
Still on hold. |
The issue this was on hold for has made it to production! @puneetlath or @kavimuru would you mind re-testing this and ensuring it's not still a bug? I am no longer able to reproduce it. |
I'm also no longer able to reproduce. |
Woohoo! Closing this one :) |
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 Result:
Should highlight 1st one and hit enter will show the emoji in the compose box
Actual Result:
Now the highlight will be invisible, and pressing enter will not do anything throws an error into the console
pressing the down arrow key three more times will bring the highlight back to the first item (basically its behaving like if there were 5 suggestions in total
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.88-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:
Recording.140.mp4
Expensify/Expensify Issue URL:
Issue reported by: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1679500065054579
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: