Closed IuliiaHerets closed 1 month ago
Triggered auto assignment to @abekkala (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.
@abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Chat-Copy to clipboard the image link and paste in assign task - title shown as attachment
For native canSetHtml
is false so we set the clipboard to parsed markdown here
https://github.com/Expensify/App/blob/00bc167940607f1418109f00e2b4e2d7d4ae858b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx#L48
but for mWeb it is true so we are copying htmlToText
of the markdown image to plain text of the clipboard
https://github.com/Expensify/App/blob/00bc167940607f1418109f00e2b4e2d7d4ae858b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx#L52
which is [Attachment]
and that will be pasted in normal text input, as opposed to the compose.
We have already dealt with the exception of anchor tags here https://github.com/Expensify/App/blob/00bc167940607f1418109f00e2b4e2d7d4ae858b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx#L52
where we copy the parsed markdown when it is an anchor tags so we similarly should check for img tag and copy the htmlToMarkdown
instead of the htmlToText
const isImgTag = /^<img([\w\W]+?)\/>$/i.test(content);
const plainText = isAnchorTag || isImgTag ? Parser.htmlToMarkdown(content) : Parser.htmlToText(content);
We can do the same for video
and other HTML tags too.
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: v9.0.35-0 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
Describe what you think should've happened
Actual Result:
Copy to clipboard the image link and paste in assign task - title&description shown as [attachment] instead of image link.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/0b41b240-6207-4414-8345-78866fa8c8f5
View all open jobs on GitHub