-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Allow optimistic assignee chat reports #22778
Conversation
Been testing some changes and realized some additional BE changes are required https://github.com/Expensify/Web-Expensify/pull/38300 |
I haven't been able to reproduce the console error after merging main on iOS or mWeb but I'm not sure since my android emulator isn't working. Also, it's fine to not worry about a failed task right now |
This occurs on the main too, so its not blocking this. |
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, thanks!
@cristipaval 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] |
Wooo!! Cc @jasperhuangg we're ready to go 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.
nicely done! tests well and don't have any qualms with the code
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@thienlnam @jasperhuangg Unable to select "Assignee" after creating task due to console warning on IOS |
Hmm yeah, apparently when first created the passed report is empty so it doesn't work |
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.54-0 🚀
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.54-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.54-13 🚀
|
👋 is the bug report #25956 a regression from this PR? Curious if we should fix it separately (on the GH linked above) or re-open the parent GH/PR here that this PR touched? |
I guess follow-up would be the case, cc: @thienlnam can help here! |
Since the reported bug was over a week from when this PR was deployed, let's go ahead and handle it separately in that issue |
value: { | ||
reportName, | ||
managerID: assigneeAccountID || report.managerID, | ||
managerEmail: assigneeEmail || report.managerEmail, |
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.
pendingFields wasn't added which caused the below bug in offline usecases - #25956
|
||
setAssigneeChatReport(chatReport); |
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.
This line introduces a bug here where the user chose a brand new assignee (whom they've never chatted with before), and then chose another old assignee, leading to the incorrect merging of isOptimisticReport
into the old assignee's account.
… assignee
cc @jasperhuangg
Details
Fixed Issues
$ #24546
$ https://github.com/Expensify/Expensify/issues/294203
PROPOSAL:
Tests
Offline tests
Same as online tests
QA Steps
Create a task
Assign someone you have not talked to before (but is still a valid account)
Verify it creates successfully
Verify the chat report between you and the assignee is also created successfully and has the correct message in the LHN
Create a task
Choose to share in that same chat report, but choose a different assignee that you haven't chatted with before
Verify that all the reports are created successfully
The task report
The chat report between you and the assignee
And the share somewhere report is updated correctly
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Screen.Recording.2023-07-26.at.5.22.14.PM.mov
Mobile Web - Chrome
Screen.Recording.2023-07-26.at.5.23.11.PM.mov
Mobile Web - Safari
Screen.Recording.2023-07-26.at.5.34.17.PM.mov
Desktop
Screen.Recording.2023-07-26.at.5.36.44.PM.mov
iOS
Android