Report_AddComment Pt. 3 - AddAttachment#9556
Conversation
|
Hey @marcaaron , is this PR taking care of showing feedback to the user in case of failure in the upload? |
|
@aldo-expensify Nope it's just dealing with adding the ability to have 2 optimistic comments at once. We'll need another PR to look into that. |
AddAttachmentAddAttachment
AddAttachmentAddAttachment
|
Linked Web-Expensify PR is on prod so taking this off HOLD. |
|
Looks like you modified Instead, all new API commands should use API.js, and follow our guidelines for writing new API commands. Unsure if your change is okay? Drop a note in #expensify-open-source! Code was removed not added. - Marc |
|
Still working through testing this on all platforms as it's been a while since I've tested the "add attachment" flow on native (found a small bug and updated). But code is ready for initial review. |
stitesExpensify
left a comment
There was a problem hiding this comment.
I know this is a big-ish PR, but honestly with all the comments and everything it LGTM!
|
Looks like you modified Instead, all new API commands should use API.js, and follow our guidelines for writing new API commands. Unsure if your change is okay? Drop a note in #expensify-open-source! |
|
Thanks @stitesExpensify. Managed to test this on all platforms and it's working well. Gonna |
|
🚀 Deployed to production by @chiragsalian in version: 1.1.84-13 🚀
|
Details
This PR simplifies the code around sending attachments with optional comments by merging 2 API calls to
AddCommentinto one call toAddAttachment(which now supports adding attachments + optional comment).Fixed Issues (Related to)
https://github.com/Expensify/Expensify/issues/211241
Tests
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followed/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)QA Steps
AddAttachmentrequest (Web Only)Screenshots
Web
2022-07-13_09-17-04.mp4
Mobile Web
2022-07-13_09-31-33.mp4
Desktop
2022-07-13_09-06-54.mp4
iOS
2022-07-13_13-01-05.mp4
Android
2022-07-13_13-07-00.mp4