-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Modify optimistic data to support new text+attachment messages #39007
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we missed decoding the html encoded text using parser.htmlToText
because of which html encoded text was displayed temporarily. This caused issue #40578
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop