Skip to content
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 2021-12-15] Selecting report from LHN using Tab + Enter adds a new line character to the composer box #6386

Closed
mountiny opened this issue Nov 21, 2021 · 15 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@mountiny
Copy link
Contributor

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

Chat_A.new.line.is.added.to.the.message.text.field.once.the.chat.is.selected.using.Enter.key.mp4

Expensify/Expensify Issue URL:
Issue reported by: @ogumen
Slack conversation:

View all open jobs on GitHub

@mountiny mountiny added External Added to denote the issue can be worked on by a contributor Engineering Daily KSv2 labels Nov 21, 2021
@mountiny mountiny self-assigned this Nov 21, 2021
@MelvinBot
Copy link

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

@developvsn
Copy link
Contributor

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.

updateComment(newComment) {

Like this:

if (newComment.length === 1 && /\r|\n/.exec(newComment)) {
            this.textInput.setNativeProps({text: ''});
            return;
        }

Web:

web.mp4

Desktop:

desktop.mp4

@parasharrajat
Copy link
Member

@developvsn Looks like you are a new contributor and your first PR is still in review #6209.
As per the contributor policy, you can not work on multiple tasks at once. Please wait for that PR to be merged.

@NicMendonca
Copy link
Contributor

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

@botify botify removed the Daily KSv2 label Nov 22, 2021
@MelvinBot MelvinBot added Weekly KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors labels Nov 22, 2021
@MelvinBot
Copy link

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

@developvsn
Copy link
Contributor

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

@mountiny
Copy link
Contributor Author

mountiny commented Nov 22, 2021

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

@parasharrajat
Copy link
Member

Proposal

  1. I think we can just use preventDefault for onPress handler in OptionRow.
    onPress={() => props.onSelectRow(props.option)}

    It will fix this issue.

@mountiny
Copy link
Contributor Author

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

@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 29, 2021
@MelvinBot
Copy link

📣 @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 📖

@mountiny
Copy link
Contributor Author

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

@parasharrajat
Copy link
Member

Applied on the post. cc: @NicMendonca

@NicMendonca
Copy link
Contributor

@parasharrajat all set! Have fun!

@botify botify added Weekly KSv2 and removed Weekly KSv2 labels Dec 8, 2021
@botify botify added the Awaiting Payment Auto-added when associated PR is deployed to production label Dec 8, 2021
@botify botify changed the title Selecting report from LHN using Tab + Enter adds a new line character to the composer box [HOLD for payment 2021-12-15] Selecting report from LHN using Tab + Enter adds a new line character to the composer box Dec 8, 2021
@botify
Copy link

botify commented Dec 8, 2021

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.18-3 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 2021-12-15. 🎊

@NicMendonca
Copy link
Contributor

@parasharrajat paid, thank you! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants