-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Markdown - Copied text (with markdown) does not show the formatting when pasted #5125
Comments
Triggered auto assignment to @jasperhuangg ( |
From the slack thread, I don't think this is a regression and I believe it falls under item 3 of this comment, so we can let this go through the normal process. |
@mananjadhav Your solution looks good to me! Let me get in touch with someone to get you a job posted on Upwork; feel free to submit a PR and request me for review when that happens! |
Triggered auto assignment to @bfitzexpensify ( |
Thanks @jasperhuangg I'll do that. |
I don't think we should do this in this way. More https://expensify.slack.com/archives/C01GTK53T8Q/p1631081985061300?thread_ts=1630818514.450000&cid=C01GTK53T8Q. I already reported it here #4009 (comment). I propose a different solution without breaking everything. |
@jasperhuangg @Jag96 Before I start on this, I would recommend checking @parasharrajat's proposal. It seems there's some old discussion and both are in different directions. You guys can evaluate which one to go ahead and then accordingly one of us will submit the PR. |
@parasharrajat brings up a great point, I agree that we don't want to create copy/paste issues for pasting outside of the app. From the slack thread:
@parasharrajat could you could help me understand what the result would be then for the following situations after your fix is completed?
Also a couple of questions:
|
I think it would be the same for other apps if they intercept pasted HTML on iOS/Android. For example, try copying and pasting HTML in Gmail.
This is another issue which I mentioned #4009 (comment) on point 3.
To correct this we have to use tags as
|
Thanks for clarifying, that all sounds good. For the control + c copy and your linked comment to point 3, would the existing behavior remain the same after your change? If so, I think the above plan is fine, since we do not want to allow users to enter HTML in the message field. Updating control + c to work will require a larger discussion since we'll have to figure out how to handle that case, so I'd rather just have this issue handle fixing the @jasperhuangg can you have a look and see if you agree? Also, since the control + c discussion has come up multiple times, I've created a slack post for the bug here. |
There's a slack post on concerns with MD on pasted links https://expensify.slack.com/archives/C01GTK53T8Q/p1630695075427100 Might want to address it with this issue. |
Thanks for the context, I've commented in slack, I think that should be a separate issue w/ a separate discussion. |
@jasperhuangg, @bfitzexpensify Huh... This is 4 days overdue. Who can take care of this? |
@jasperhuangg, @bfitzexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
@jasperhuangg, @bfitzexpensify 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it! |
Plate is full with User-Created Policy Rooms stuff and midterm season approaching, going to unassign myself for the time being. |
I'll reassign this on Monday once we're past the hold. |
Yes melv, will get this rolling on monday |
E/Clipboard PR merged, awaiting E/App PR |
There is a silly issue. Npm Installing the package does not work but yarn install works. |
#6537 in review |
Issue found in review that will be discussed in Slack. |
Hi! I'm coming into this late, and having a hard time figuring out what the final plan is. I would think there should only be two outputs:
However, it seems from the above discussion this is not what we're doing, though I can't quite figure out what we are doing. Can someone summarize the final plan? |
So we planned to copy the HTML markup of the message in the clipboard so that we can get the native formatting based on the app we use.
But we hit a bottleneck wherein our Android app pasting HTML shows formatted text like slack and we don't have a direct way to block the direct pasting of HTML in composer. |
I know that you've spent some time on the initial PR, but perhaps we should return to the proposal stage, as it seems we need to rethink this solution. What do you think @parasharrajat? |
Yeah, now my thoughts are just saying markdown in the clipboard as text which will work fine for most of the providers which accept MD but not for Gmail and locations which accept text. I will try to give some time this week to explore it further and come up with a proper plan and all the options that we can do. |
Makes sense, we can further improve later on if we have further ideas. |
Hi @parasharrajat, any updates here? |
Sorry, didn't get more time to look into this. But I can only suggest saving MD as text. I didn't find any way to disable HTML pasting. I will update the PR asap if you are fine with the approach. If that does not sound good. I request you to reopen this issue to other contributors. |
I will update the PR today to save MD into the clipboard based on #5125 (comment). Sorry I missed that comment earlier. |
Just ran into this issue again today and was frustrated, it was for the below. In Slack, the text was added and the emoji wasn't, which seems like a good solution, at least to start so we can paste in text with emoji and the most important part will show
|
I will update the PR to store MD as of now. I was trying to manage the HTML yesterday but there are a few issues. So I think MD copy would be fine at least.
That is something needs to be build into the app. Slack usages images as emojis and our app use pure text emojies. So we will have to add new code to manage that copy pasting. Unfortunately its not part of this issue. Let me know if you want that to be done also. I can submit a small proposal here for the change and add that into the PR. |
@Julesssss I just checked that this part is already done App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 54 to 63 in 1d72a5e
I have closed my PR #6537 as HTML pasting had issues. Also, we will not need changes from our clipboard fork where I added HTML copy/paste support. Please let me know what are the next steps? |
Hi @parasharrajat, I'm a bit confused but it sounds like we don't need to make any changes?
Is this something that will be unused now? If so we should probably clear that up and then we can pay out the issue. |
Yeah, maybe just revert the PRs from the fork. I am not able to find the fork as well. |
I think we can close this now. @Julesssss |
Re-hired you @parasharrajat (job had closed). Will pay out once you accept. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
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:
User has to manually add the markdown again.
Platform:
Where is this issue occurring?
Version Number: 1.0.94-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
copy-to-clipboard-formatting.mp4
Issue reported by: @mananjadhav
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1630818514450000
View all open jobs on GitHub
Similar issue was raised here #3790 and fixed here #4009 (CC @parasharrajat / @Jag96)
The text was updated successfully, but these errors were encountered: