App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-12-15] Selecting report from LHN using Tab + Enter adds a new line character to the composer box

Open mountiny opened this issue 5 years ago β€’ 15 comments

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:

  1. Click on the LHN on the top to not have anything selected
  2. Using Tab key, select a chat
  3. 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:

View all open jobs on GitHub

mountiny avatar Nov 21 '21 17:11 mountiny

Triggered auto assignment to @NicMendonca (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Nov 21 '21 17:11 MelvinBot

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 avatar Nov 22 '21 10:11 developvsn

@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.

parasharrajat avatar Nov 22 '21 11:11 parasharrajat

Job post: https://www.upwork.com/jobs/~0111772087299f6686

NicMendonca avatar Nov 22 '21 15:11 NicMendonca

Current assignee @mountiny is eligible for the Exported assigner, not assigning anyone new.

MelvinBot avatar Nov 22 '21 15:11 MelvinBot

@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 avatar Nov 22 '21 16:11 developvsn

@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.

mountiny avatar Nov 22 '21 16:11 mountiny

Proposal

  1. I think we can just use preventDefault for onPress handler in OptionRow. https://github.com/Expensify/App/blob/d2eadd4ee45c5797e83140ddbb1caf7c0793571c/src/pages/home/sidebar/OptionRow.js#L135 It will fix this issue.

parasharrajat avatar Nov 26 '21 21:11 parasharrajat

Perfect @parasharrajat, feel free to apply for the job!

mountiny avatar Nov 29 '21 19:11 mountiny

πŸ“£ @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 πŸ“–

MelvinBot avatar Nov 29 '21 19:11 MelvinBot

@parasharrajat Please dont forget to ping here once you have applied for the job, so @NicMendonca can hire you:)

mountiny avatar Nov 29 '21 21:11 mountiny

Applied on the post. cc: @NicMendonca

parasharrajat avatar Nov 30 '21 08:11 parasharrajat

@parasharrajat all set! Have fun!

NicMendonca avatar Dec 01 '21 14:12 NicMendonca

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:

botify avatar Dec 08 '21 19:12 botify

@parasharrajat paid, thank you! πŸŽ‰

NicMendonca avatar Dec 16 '21 14:12 NicMendonca