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 2022-01-11] [$1000] Copying messages with markdown via CTRL + C does not keep formatting #5142

Closed
isagoico opened this issue Sep 8, 2021 · 55 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 Weekly KSv2

Comments

@isagoico
Copy link

isagoico commented Sep 8, 2021

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. Send several messages each with a different markdown (bold, strike, italic, and hyperlink)
  2. Copy and paste each of the messages in compose box via the ctrl +C method

Expected Result:

HTML Markdown should be copied and pasted.

Actual Result:

HTML Markdown is not copied and user has to add the markdown again.

Workaround:

HTML Markdown is not copied and user has to add the markdown again.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.0.94-0

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

image

Expensify/Expensify Issue URL:

Issue reported by: @Jag96 / @parasharrajat
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1631123012073500?thread_ts=1631122717.073400&cid=C01GTK53T8Q

View all open jobs on GitHub

@MelvinBot
Copy link

Triggered auto assignment to @nickmurray47 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@isagoico
Copy link
Author

isagoico commented Sep 8, 2021

Comment from thread that has more information on this bug:

Note that this is a different issue from #5125, which handles the copy via Copy from clipboard. Since this has come up a few times, I'm filing an issue here so we can have something to reference in the future.
The credit for finding this bug goes to @parasharrajat who asked about it initially in this issue.
The issue here is:

When I copy the existing sent message which is formatted and pastes it. it does not convert to formatted MD strings. The main issue here is that we don't use HTML semantic tags for rendering Every type of element is made with div and styling rules. Which we can't really interpret ATM.

So in order to fix this issue, we would have to use html tags such as a/em/b in our app instead of divs + styling.

@parasharrajat
Copy link
Member

@isagoico You tagged the wrong guy.

@nickmurray47
Copy link
Contributor

Reproduction steps are clear and confirmed this still happens locally.

So in order to fix this issue, we would have to use html tags such as a/em/b in our app instead of divs + styling.

@parasharrajat Where do these adjustments need to be made and are you interested in proposing a more detailed solution?

@parasharrajat
Copy link
Member

I have requested the lib owner to possibly upgrade the lib so that we get this support out of the box. Otherwise, I will update here on what I think is best.

@nickmurray47
Copy link
Contributor

Great, thanks @parasharrajat!

@nickmurray47
Copy link
Contributor

Going to assign the External label and unassign myself, seems like a good issue for a contributor

@nickmurray47 nickmurray47 added the External Added to denote the issue can be worked on by a contributor label Sep 13, 2021
@MelvinBot
Copy link

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

@dylanexpensify
Copy link
Contributor

Working on this now!

@dylanexpensify
Copy link
Contributor

@MelvinBot MelvinBot added Weekly KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors and removed Daily KSv2 labels Sep 14, 2021
@MelvinBot
Copy link

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

@dylanexpensify
Copy link
Contributor

not overdue

@dylanexpensify
Copy link
Contributor

not overdue

@thienlnam
Copy link
Contributor

PR in review here: #6732

Changes are looking good but we're working through a package-lock.json diff

@thienlnam
Copy link
Contributor

Just merged the PR - now waiting on the regression period (7 days)

@MelvinBot MelvinBot removed the Overdue label Jan 3, 2022
@botify botify added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 4, 2022
@botify botify changed the title [$1000] Copying messages with markdown via CTRL + C does not keep formatting [HOLD for payment 2022-01-11] [$1000] Copying messages with markdown via CTRL + C does not keep formatting Jan 4, 2022
@botify
Copy link

botify commented Jan 4, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.24-19 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 2022-01-11. 🎊

@mallenexpensify
Copy link
Contributor

@thienlnam sanity check... before the issue, when you pasted a url into NewDot it didn't auto-hyperlink, you'd have to include markdown. Now, after this PR/issue, when you paste a link in, it's auto-hyperlinked? and.. it doesn't show the markdown it used to ?

@thienlnam
Copy link
Contributor

Chatted with @mallenexpensify 1:1

It looks like the fix is not working correctly - it does hyperlinks well but for other markdown options it does not work as expected

Sent text:
Screen Shot 2022-01-04 at 11 00 34 AM

When copied and pasted:
Screen Shot 2022-01-04 at 11 00 56 AM

cc @kursat

@MelvinBot

This comment has been minimized.

@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 4, 2022
@kursat
Copy link
Contributor

kursat commented Jan 5, 2022

Hey @thienlnam, @mallenexpensify,

It looks like the fix is not working correctly - it does hyperlinks well but for other markdown options it does not work as expected

Sent text: Screen Shot 2022-01-04 at 11 00 34 AM

When copied and pasted: Screen Shot 2022-01-04 at 11 00 56 AM

I am not able to reproduce issue on rev. 580c9db or on https://staging.new.expensify.com. Tried both on Firefox and Chrome on Ubuntu 20.04.3 LTS. Also checked context menus both Android and Web versions.

Can you provide details about the issue? What was the copying method? What's your environment?

@thienlnam
Copy link
Contributor

We're testing this on production since the PRs have been deployed there.

Currently testing on Chrome on a Mac V11.6

Tested with copying using the context menu
Screen Shot 2022-01-05 at 3 03 33 PM

and using CMD + V to paste

as well as copying using CMD + C and using CMD + V to paste

@kursat
Copy link
Contributor

kursat commented Jan 6, 2022

Its working on following env:

Chrome: Version 97.0.4692.71 (Official Build) (x86_64)
MacOS: 10.15.7 (19H1615)

2022-01-06.09-19-13.mp4

Tested with copying using the context menu Screen Shot 2022-01-05 at 3 03 33 PM

Also tried with hover menu which I noticed after shooting the video.

Currently this is what i got but I'll try to find a way to test on newer versions of mac.

@parasharrajat
Copy link
Member

It should be platform agnostic. Maybe we are missing some step here.

@thienlnam
Copy link
Contributor

thienlnam commented Jan 6, 2022

Huh, I retested this morning and it is working as expected - maybe the deploy didn't install on prod until recently. Either way, all good here - thanks for confirming!

@dylanexpensify
Copy link
Contributor

Payment sent for both @parasharrajat and @kursat! Contracts ended, job posting closed

@dylanexpensify
Copy link
Contributor

@parasharrajat created new job for you to apply to to get paid for reporting via agency account! https://www.upwork.com/jobs/~01c306c74dd75512bf

@dylanexpensify
Copy link
Contributor

offer sent

@dylanexpensify
Copy link
Contributor

payment sent, job closed, contract ended fr Rajat

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 Weekly KSv2
Projects
None yet
Development

No branches or pull requests