App: [Hold for payment 2024-02-13] [$500] Private Note - Code block paste in private notes does not work (works fine in native apps)

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: 1.3.85.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 Expensify/Expensify Issue URL: Issue reported by: @dhanashree-sawant Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697530399668279

Action Performed:

  1. Open the app
  2. Open any user report
  3. Send 3 backtick code block eg: Hii
  4. Hover and click copy to clipboard
  5. Click on header to open user details
  6. Click on privates notes-> my notes
  7. Paste the copied text and observe that app removes backticks while pasting

Expected Result:

App should paste text with backticks in private notes

Actual Result:

App does not paste text with private notes (works fine only in native apps)

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native
Android: mWeb Chrome

https://github.com/Expensify/App/assets/93399543/fe21985a-eaf4-459a-b788-30c338892c6b

iOS: Native
iOS: mWeb Safari

https://github.com/Expensify/App/assets/93399543/db2f07e0-7046-4f05-9fa6-957755079814

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/93399543/5b66b28c-a05d-4afd-b21f-903255894055

https://github.com/Expensify/App/assets/93399543/d26511ec-d51c-462f-8506-fefb5be72563

MacOS: Desktop

https://github.com/Expensify/App/assets/93399543/7212464f-bcdd-42e4-81f0-42bac2828632

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013e368c7fef7e59bc
  • Upwork Job ID: 1714338003846836224
  • Last Price Increase: 2023-11-07

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 79 (52 by maintainers)

Most upvoted comments

@garrettmknight It’s been deployed to production last week. Can you leave a payment summary please?

@Santhosh-Sellavel will let u know when to review as the pr is too old will have to merge main and test

@robertKozik will get a pr ready for tomorrow 👍

@garrettmknight offer accepted. But don’t pay it’s on regression and still not fixed 👍

This one; we’ll close the other one soon

Hi all! sorry for keep you waiting for so long. I’ve get familiar with the issue a little and I think that the root cause here is that TextInput on the Private Notes screen doesn’t support pasting HTML content (like it is in Composer example).

After getting acquainted with both of the avaiable proposal, I can see flaws on both of them, which I want to point uout separetly:

  • @yh-0218: your proposal is getting rid of not only the issue, but the correctly implemented part of the code as well. We should still be able to copy/paste the HTML content, not only as string. The Clipboard.canSetHtml function, which you want to get rid of, is exacly for this purpose - enable the HTML copying
  • @FitseTLT - your solution would work, but it would require from us to create platform-dependant versions of the edit private notes screen as we are creating listeners on document object. In my opinion it’s not worth it in this case to condemn contributors to maintain both very similar versions of code. But I like more your alternative solution to pass the markdown version of content as text/plain. If you could update your proposal so this one would be the primary solution I would be glad.

I believe that the secondary solution from the @FitseTLT is the most promising. From mine point of view copying function should copy the contant ideally with formatting, so exposing both versions HTML and Markdown of the content is expected here

@garrettmknight Hello, I am wrapping up some urgent matters today, and I will be OOO from tomorrow to Monday. Can we assign another C+ here so as not to block the task?

@FitseTLT I’m going to check your proposal again soon. I just need a bit more time to look into how code blocks can be pasted on web platforms to make sure your solution works properly.

I was able to repro it on web via Chrome and also on the MacOS app.