Modify optimistic data to support new text+attachment messages#39007
Modify optimistic data to support new text+attachment messages#39007johnmlee101 merged 4 commits intomainfrom
Conversation
|
@rayane-djouah Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeRecording.2024-04-11.040747.mp4Android: mWeb ChromeRecording.2024-04-11.010729.mp4iOS: NativeRecording.2024-04-11.005714.mp4iOS: mWeb SafariRecording.2024-04-11.010117.mp4MacOS: Chrome / SafariRecording.2024-04-11.005037.mp4MacOS: DesktopRecording.2024-04-11.004727.mp4 |
Bug 1:Steps:
Expected result:LHN shows the report subtitle as "This is an image [Attachment]" Actual Result:LHN shows the report subtitle as "[Attachment]" Screenshots/VideosRecording.2024-04-08.012818.mp4 |
Bug 2:Not reproducible on main. Edit: reproduced on chrome with a new account. Steps:
Result:
Screenshots/VideosRecording.2024-04-08.011255.mp4Recording.2024-04-08.020823.mp4 |
Bug 3:It is also reproducible on main NAB for this PR. Steps:
Result:"Auth CreateReportAction returned an error. Screenshots/VideosRecording.2024-04-08.010220.mp4 |
Bug 4:It is also reproducible on main NAB for this PR. Steps:
Result:Console error: Screenshots/VideosRecording.2024-04-08.005357.mp4 |
Bug 5:Steps:
Expected result:The file link shows in a new line Actual Result:The file link is concatenated with the message. Screenshots/VideosRecording.2024-04-08.014159.mp4 |
Bug 6:Steps:
Expected result:We have three options:
I think that we can also add a space/new line between the message and the image markdown. Actual Result:Copied text is: Screenshots/VideosRecording.2024-04-08.014605.mp4 |
Bug 7:Steps:
Expected result:User is able to edit the message. Actual Result:App crashes with a console error: Screenshots/VideosRecording.2024-04-08.021659.mp4 |
|
Please sync with main, as the branch is +2k commits behind. |
Bug 8:Steps:
Expected result:Users can click on a download option to download the attachment. Actual Result:There is no download option in text+image messages. Screenshots/VideosRecording.2024-04-08.022607.mp4 |
Bug 9:Steps:
Expected result:Markdown is applied to the sent message. Actual Result:Markdown is not applied to the sent message. Screenshots/VideosRecording.2024-04-08.023453.mp4 |
|
"Android: mWeb Chrome" Screenshot/Video is missing in author checklist |
rayane-d
left a comment
There was a problem hiding this comment.
Please check the above reported bugs. Thank you!
|
Current progress:
|
I updated the branch with
If you're able to test it there, then I think this is OK. We should be all set here! |
|
@johnmlee101 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@tgolen, Can you please assign me in the linked issue? Thank you! |
|
🚀 Deployed to staging by https://github.com/johnmlee101 in version: 1.4.63-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
| textForNewComment = parser.htmlToText(htmlForNewComment); | ||
| } else { | ||
| htmlForNewComment = `${commentText}\n${CONST.ATTACHMENT_UPLOADING_MESSAGE_HTML}`; | ||
| textForNewComment = `${commentText}\n${CONST.ATTACHMENT_UPLOADING_MESSAGE_HTML}`; |
There was a problem hiding this comment.
Here, we missed decoding the html encoded text using parser.htmlToText because of which html encoded text was displayed temporarily. This caused issue #40578
|
Coming from this Issue #52319 , Pressing the up key to edit the last sent message wasn't working for the message contains an embedded image. This happened because, after sending an attachment with text, the selection was not reset to 0, which prevented editing. We could have caught this in the PR where we implemented the Attachment + text functionality here, more details can be found in this selected proposal #52319 (comment) |


Details
Now that text and attachments are combined into a single report action, the optimistic data needed to change slightly to account for it.
Fixed Issues
$ #35977
Tests
Offline tests
Same as above
QA Steps
Same as above, but also perform this test:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop