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

[$125] Chat - With quote markdown, url text on tapping enter key not moved to next line. #54522

Open
2 of 8 tasks
IuliiaHerets opened this issue Dec 24, 2024 · 23 comments
Open
2 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 24, 2024

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: 9.0.78-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
Issue reported by: Applause Internal Team
Device used: Redmi note 10s Android 13
App Component: Chat Report View

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Open chat
  3. Enter > jsjjd.com
  4. Send the message
  5. Edit the message
  6. Tap enter key and try to make url text into two lines

Expected Result:

With quote markdown, url text on tapping enter key must be moved to next line.

Actual Result:

With quote markdown, url text on tapping enter key not moved to next line.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6701644_1735017397193.Screenrecorder-2024-12-24-10-40-53-895_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021871675231934377672
  • Upwork Job ID: 1871675231934377672
  • Last Price Increase: 2024-12-31
  • Automatic offers:
    • daledah | Contributor | 105551577
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 24, 2024
Copy link

melvin-bot bot commented Dec 24, 2024

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@sakluger
Copy link
Contributor

I tested myself in the iOS app and I saw different behavior from the video above. I tested with hshs.com and google.com.

With hshs.com, it kept everything on the same line:

hshs link

With google.com, which was too big to have on a single line, it kept the https:// on the first line and moved the remainder to the second line:

google link

I also tested on MacOS chrome and could not reproduce.

@sakluger
Copy link
Contributor

I'm going to set the bounty to $125 to start, hopefully this is a simple fix.

@sakluger sakluger added the External Added to denote the issue can be worked on by a contributor label Dec 24, 2024
Copy link

melvin-bot bot commented Dec 24, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021871675231934377672

@melvin-bot melvin-bot bot changed the title Chat - With quote markdown, url text on tapping enter key not moved to next line. [$250] Chat - With quote markdown, url text on tapping enter key not moved to next line. Dec 24, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 24, 2024
Copy link

melvin-bot bot commented Dec 24, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (External)

@sakluger sakluger changed the title [$250] Chat - With quote markdown, url text on tapping enter key not moved to next line. [$125] Chat - With quote markdown, url text on tapping enter key not moved to next line. Dec 24, 2024
Copy link

melvin-bot bot commented Dec 24, 2024

Upwork job price has been updated to $125

@daledah
Copy link
Contributor

daledah commented Dec 25, 2024

Edited by proposal-police: This proposal was edited at 2024-12-26 01:40:39 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

With quote markdown, url text on tapping enter key not moved to next line.

What is the root cause of that problem?

We have the logic to throw the error if text !== markdown

https://github.com/Expensify/react-native-live-markdown/blob/6447ea9ec54830f1d55c1eac0e9274ce93a4c769/src/parseExpensiMark.ts#L283-L289

What changes do you think we should make in order to solve the problem?

This PR removes try/catch so when there's parse error, it cause the issue above. I think we should bring try/catch back.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

We should create the test for parseExpensiMark to cover the case when there's an parse error

What alternative solutions did you explore? (Optional)

We can instead show the warning and return empty array

if (text !== markdown) {
  console.warn(
    `[react-native-live-markdown] Parsing error: the processed text does not match the original Markdown input. This may be caused by incorrect parsing functions or invalid input Markdown.\nProcessed input: '${JSON.stringify(
      text,
    )}'\nOriginal input: '${JSON.stringify(markdown)}'`,
  );
  return [];
}

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@daledah
Copy link
Contributor

daledah commented Dec 25, 2024

I'm asking for the author the reason why he removed try/catch block: https://github.com/Expensify/react-native-live-markdown/pull/439/files#r1897091802

@tomekzaw
Copy link
Contributor

Responded here: Expensify/react-native-live-markdown#439 (comment)

@daledah
Copy link
Contributor

daledah commented Dec 26, 2024

Thanks @tomekzaw. @getusha What do you think?

Copy link

melvin-bot bot commented Dec 30, 2024

@sakluger, @getusha Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Dec 30, 2024
@sakluger
Copy link
Contributor

I think @getusha is out on vacation. Let's hold until the new year.

Copy link

melvin-bot bot commented Dec 31, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Jan 1, 2025

@sakluger, @getusha Still overdue 6 days?! Let's take care of this!

@sakluger
Copy link
Contributor

sakluger commented Jan 2, 2025

@getusha welcome back! Let me know if you need to have some of your assigned issues redistributed, I'm happy to assign this to someone else. Otherwise, I'll wait for your review.

@getusha
Copy link
Contributor

getusha commented Jan 2, 2025

@sakluger will review in short. happy new year!

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2025
@getusha
Copy link
Contributor

getusha commented Jan 3, 2025

@daledah's proposal looks good to me
🎀 👀 🎀 C+ Reviewed!

Copy link

melvin-bot bot commented Jan 3, 2025

Triggered auto assignment to @thienlnam, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@thienlnam
Copy link
Contributor

Let's go with the solution that @tomekzaw recommended - so the optional in the proposal

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 3, 2025
Copy link

melvin-bot bot commented Jan 3, 2025

📣 @daledah 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@tomekzaw
Copy link
Contributor

tomekzaw commented Jan 6, 2025

PR Expensify/react-native-live-markdown#593 has been merged into react-native-live-markdown.

Copy link

melvin-bot bot commented Jan 7, 2025

@sakluger @thienlnam @getusha @daledah this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Jan 7, 2025

@sakluger, @thienlnam, @getusha, @daledah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

6 participants