-
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
Show comment/requests in report preview #23651
Conversation
@abdulrahuman5196 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] |
@Gonals Is the PR complete for review? We had some commits today as well? Wanted to check if i can start review on the same or wait. |
Yes, this should be ready for review |
@abdulrahuman5196 bump! |
Sorry for the delay. Will review in couple of hours. |
@Gonals Screen.Recording.2023-08-02.at.9.35.02.PM.mov |
Nice catch! it is 50-50. @abdulrahuman5196 I have fixed the frontend here to optimistically update it, but the backend bug remains. Let's ignore it for this PR and I'll fix it in a different issue. Let's see if we can merge today, as I'm OOO staring tomorrow! |
@Gonals Got it. I tested now. I think the optimistically updating data is also not complete and in cases I still seeing issues. Like
But I am fine with this, given we are planning to create separate bug to address the request count not getting updating on requests deletion/updation. I think it would be best to re-test the optimistic function and backend verification as well in that issue. For now IMO we can keep that deletion/updation is not working properly reflection on the preview. |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-08-08.at.4.12.42.PM.mp4Mobile Web - Chromeaz_recorder_20230808_163452.mp4Mobile Web - SafariUntitled.1.mp4DesktopScreen.Recording.2023-08-08.at.4.32.29.PM.mp4iOSScreen.Recording.2023-08-08.at.4.36.44.PM.mp4AndroidScreen.Recording.2023-08-08.at.5.12.51.PM.mp4 |
@Gonals Changes looks good. We have to create 2 issues
Screen.Recording.2023-08-08.at.4.39.58.PM.mov |
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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @Gonals
🎀 👀 🎀
C+ Reviewed
@MonilBhavsar 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] |
Do we need to update this function usage to pass |
Done! |
@@ -95,6 +95,9 @@ const defaultProps = { | |||
function ReportPreview(props) { | |||
const managerID = props.iouReport.managerID || props.action.actorAccountID || 0; | |||
const isCurrentUserManager = managerID === lodashGet(props.session, 'accountID'); | |||
const moneyRequestCount = lodashGet(props.action, 'childMoneyRequestCount', 0); | |||
const moneyRequestComment = lodashGet(props.action, 'childLastMoneyRequestComment', ''); | |||
const showComment = moneyRequestComment || moneyRequestCount > 1; |
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.
NAB
const showComment = moneyRequestComment || moneyRequestCount > 1; | |
const shouldShowComment = moneyRequestComment || moneyRequestCount > 1; |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.52-0 🚀
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.52-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.52-5 🚀
|
@@ -1900,6 +1904,8 @@ function updateReportPreview(iouReport, reportPreviewAction) { | |||
type: CONST.REPORT.MESSAGE.TYPE.COMMENT, | |||
}, | |||
], | |||
childLastMoneyRequestComment: comment || reportPreviewAction.childLastMoneyRequestComment, | |||
childMoneyRequestCount: reportPreviewAction.childMoneyRequestCount + 1, |
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.
Details
cc @JmillsExpensify, @trjExpensify
Fixed Issues
$ #21178
Tests
Offline tests
Same as tests but offline
QA Steps
Same as tests
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
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android