[HOLD for payment 2021-12-15] Selecting report from LHN using Tab + Enter adds a new line character to the composer box
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:
- Click on the LHN on the top to not have anything selected
- Using Tab key, select a chat
- Click Enter to open the page
Expected Result:
The report should be opened but no changes should be made to the message in composer (either new message or existent draft).
Actual Result:
The report is opened but in the message composer, new line character has been added.
Workaround:
Use mouse, but this is mostly accessibility issue. In this case user needs to always delete the new line.
Platform:
Where is this issue occurring?
- Web
- Desktop App
Version Number: v1.1.14-4 Reproducible in staging?: yes Reproducible in production?: yes Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/88733897/142771763-71523e04-9af3-457b-adb7-ba08883e5cca.mp4
Expensify/Expensify Issue URL: Issue reported by: @ogumen Slack conversation:
Triggered auto assignment to @NicMendonca (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Proposal
This bug is occurring because message text input is focused by default after opening report screen, and it detect 'Enter' pressing and put it in input.
Our proposal is to check in begging updateMessage function if value of message is 1 and it consist new line.
https://github.com/Expensify/App/blob/f5a1b58d1aeeb804f23f9b1d6769b6ef25e57872/src/pages/home/report/ReportActionCompose.js#L339
Like this:
if (newComment.length === 1 && /\r|\n/.exec(newComment)) {
this.textInput.setNativeProps({text: ''});
return;
}
Web:
https://user-images.githubusercontent.com/71173662/142846290-8572ec98-c2a3-42c5-ae63-6fdc781114af.mp4
Desktop:
https://user-images.githubusercontent.com/71173662/142846345-665e4f25-4b0a-45c8-8d5a-62635fcef28c.mp4
@developvsn Looks like you are a new contributor and your first PR is still in review https://github.com/Expensify/App/pull/6209. As per the contributor policy, you can not work on multiple tasks at once. Please wait for that PR to be merged.
Job post: https://www.upwork.com/jobs/~0111772087299f6686
Current assignee @mountiny is eligible for the Exported assigner, not assigning anyone new.
@mountiny @parasharrajat We are sorry this situation occurred, but we saw that this #5974 bug was fixed in the production and we wanted to know if we could work on other issues or we have to wait review to this #6209 PR? Thank you for your time.
@developvsn No worries. I see the issue you mentioned is still open which indicates it is not solved. If the original issue does not occur on production, please comment on the issue so we can retest it and make sure it is true. Then the assigned engineer can close the issue and you are welcomed to apply for new issues.
Sorry for the complications, as you might guess, it is not common that issues miraculously fix themselves π so even if the issue has been resolved some other way, I think it will not be considered as your first PR. However, reach out to the engineer at the issue how to resolve this situation.
I believe since you have been hired for the issue, you should be compensated for the research and the work even though it has been resolved in some other way if that is the case.
Proposal
- I think we can just use preventDefault for
onPresshandler in OptionRow. https://github.com/Expensify/App/blob/d2eadd4ee45c5797e83140ddbb1caf7c0793571c/src/pages/home/sidebar/OptionRow.js#L135 It will fix this issue.
Perfect @parasharrajat, feel free to apply for the job!
π£ @parasharrajat You have been assigned to this job by @mountiny! Please apply to this job in Upwork and let us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@parasharrajat Please dont forget to ping here once you have applied for the job, so @NicMendonca can hire you:)
Applied on the post. cc: @NicMendonca
@parasharrajat all set! Have fun!
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.1.18-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/6515
If no regressions arise, payment will be issued on 2021-12-15. :confetti_ball:
@parasharrajat paid, thank you! π