-
Notifications
You must be signed in to change notification settings - Fork 3k
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 2024-02-13] [$500] Private Note - Code block paste in private notes does not work (works fine in native apps) #29806
Comments
Triggered auto assignment to @garrettmknight ( |
Job added to Upwork: https://www.upwork.com/jobs/~013e368c7fef7e59bc |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Code block paste doesn't work properly in private notes text input What is the root cause of that problem?When user copies code block message we set the code in 'html' prop of the clipboard and the plain text (found by parsing it with ExpensiMark App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 284 to 292 in 7b546b0
So when the user pastes in PrivatesNotesEditPage text input the plain text is copied by default as we have not implemented a code that pastes the html whenever the clipboard has html code inside it as we did in our Composer component.
What changes do you think we should make in order to solve the problem?We need to take the code inside Composer component that handles paste of html code and reimplement it in a reusable code (custom hook or HOC) and then use it both in here privates notes and in composer.
And in both PrivateNotesEditPage and Composer we call the custom hook passing the appropriate textInputRef parameter like this (or we can also return the ref from the custom hook and assign it to the ref of our text inputs):
In Composer we change App/src/components/Composer/index.js Lines 298 to 330 in 098157c
to
(Optional) We can use also HOC (whichever is appropriate I am just trying to explain the basic idea). 10.New.Expensify.1.mp4What alternative solutions did you explore? (Optional) |
Cannot reproduce on latest main |
Updated comment 3.New.Expensify.2.mp4 |
I was able to repro it on web via Chrome and also on the MacOS app. |
@ArekChr what do you think of that proposal? |
@FitseTLT, Could you provide more details about where the change should be applied? |
@ArekChr we need to add this code to
|
@FitseTLT, I'm a bit confused. Previously, you mentioned that we don't handle pasted HTML like in the Composer, but now you suggest adding it to the PrivateNotesEditPage. If you suggest using the same code from the |
Yes, reusable code, that's exactly what I proposed under |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Updated comment |
@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. |
@ArekChr will you be able to review this week? |
Thanks for the bump, done. Let me know if I misunderstood something. All yours @Santhosh-Sellavel 👍 |
@Santhosh-Sellavel will let u know when to review as the pr is too old will have to merge main and test |
PR is being actively reveiwed. |
@garrettmknight It's been deployed to production last week. Can you leave a payment summary please? |
Summarizing payments for this issue: Reporter: @dhanashree-sawant $50 paid via Upwork |
This comment was marked as resolved.
This comment was marked as resolved.
@Santhosh-Sellavel please fill out the checklist when you get a chance and request payment. Dropping to weekly till then. |
Just waiting on checklist and payment. |
@Santhosh-Sellavel can you request payment when you get a chance? The checklist was completed in the original issue. |
Feel free to close this one, I'll request later |
Requested on ND |
$500 approved for @Santhosh-Sellavel |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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:
Hii
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?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
Android.chrome.copy.to.clipboard.code.block.paste.notes.mp4
iOS: Native
iOS: mWeb Safari
ios.safari.paste.code.block.in.notes.mov
MacOS: Chrome / Safari
windows.chrome.code.block.paste.notes.mp4
mac.chrome.paste.code.block.notes.not.working.mov
MacOS: Desktop
mac.desktop.paste.code.block.notes.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: