-
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
[$500] Web - Not found page display briefly when we access the PrivateNotesListPage
via deeplink
#27704
Comments
PrivateNotesListPage
via deeplinkPrivateNotesListPage
via deeplink
Triggered auto assignment to @abekkala ( |
Job added to Upwork: https://www.upwork.com/jobs/~010e6deeec4e90fc66 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @stephanieelliott ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr ( |
Proposal by: @dukenv0307 ProposalPlease re-state the problem that we are trying to solve in this issue.Not found page display briefly when we access the What is the root cause of that problem?When we access it via deep link, the report needs to load from
What changes do you think we should make in order to solve the problem?We should subscribe
With What alternative solutions did you explore? (Optional)NA ResultScreencast.from.17-09-2023.22.14.43.webm |
PrivateNotesListPage
via deeplinkPrivateNotesListPage
via deeplink
ProposalPlease re-state the problem that we are trying to solve in this issue.Not found page display briefly when we access the What is the root cause of that problem?To show
and it returns true for few millis because report.reportID is not present for time being as the report data is not yet fetched.
What changes do you think we should make in order to solve the problem?Solution AnalysisBefore jumping to solution, here is the solution analysis:
Point 3 covers all other points. SolutionChanges in PrivateNotesListPageWe should use export default compose(
withLocalize,
+ withReportOrNotFound,
withOnyx({
report: {
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT}${route.params.reportID.toString()}`,
},
session: {
key: ONYXKEYS.SESSION,
},
personalDetailsList: {
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
}),
withNetwork(),
)(PrivateNotesListPage); we can also make the <ScreenWrapper includeSafeAreaPaddingBottom={false}>
<FullPageNotFoundView
- shouldShow={_.isEmpty(report.reportID) || (!report.isLoadingPrivateNotes && network.isOffline && _.isEmpty(lodashGet(report, 'privateNotes', {})))}
+ shouldShow={report.isLoadingPrivateNotes === false && network.isOffline && _.isEmpty(lodashGet(report, 'privateNotes', {}))}
onBackButtonPress={() => Navigation.goBack()}
>
... Changes in PrivateNotesViewPageEven though this problem states PrivateNotesListPage, PrivateNotesViewPage has same issue but there are 2 more problems in addition.
Since it has additional issues, ideally we should take this as a separate issue. const privateNote = lodashGet(report, ['privateNotes', route.params.accountID, 'note'], '');
+ useEffect(() => {
+ if (_.isEmpty(report.privateNotes)) {
+ Report.getReportPrivateNote(report.reportID);
+ }
+ }, [report.reportID]);
return (
<ScreenWrapper
includeSafeAreaPaddingBottom={false}
testID={PrivateNotesViewPage.displayName}
>
<FullPageNotFoundView
- shouldShow={_.isEmpty(report) || _.isEmpty(report.privateNotes) || !_.has(report, ['privateNotes', route.params.accountID, 'note'])}
+ shouldShow={report.isLoadingPrivateNotes === false && _.isEmpty(privateNote)}
subtitleKey="privateNotes.notesUnavailable"
>
<HeaderWithBackButton
title={translate('privateNotes.title')}
subtitle={isCurrentUserNote ? translate('privateNotes.myNote') : `${lodashGet(personalDetailsList, [route.params.accountID, 'login'], '')} note`}
shouldShowBackButton
onCloseButtonPress={() => Navigation.dismissModal()}
/>
+ {report.isLoadingPrivateNotes && _.isEmpty(report.privateNotes) ? (
+ <FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} />
+ ) : (
<ScrollView style={[styles.flexGrow1]}>
<OfflineWithFeedback pendingAction={lodashGet(report, ['privateNotes', route.params.accountID, 'pendingAction'], null)}>
<MenuItemWithTopDescription
description={translate('privateNotes.composerLabel')}
title={privateNote}
onPress={() => isCurrentUserNote && Navigation.navigate(ROUTES.getPrivateNotesEditRoute(report.reportID, route.params.accountID))}
shouldShowRightIcon={isCurrentUserNote}
numberOfLinesTitle={0}
shouldRenderAsHTML
brickRoadIndicator={!_.isEmpty(lodashGet(report, ['privateNotes', route.params.accountID, 'errors'], '')) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : ''}
disabled={!isCurrentUserNote}
shouldGreyOutWhenDisabled={false}
/>
</OfflineWithFeedback>
</ScrollView>
+. )}
</FullPageNotFoundView>
</ScreenWrapper>
);
export default compose(
withLocalize,
+ withReportOrNotFound,
withOnyx({
report: {
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT}${route.params.reportID.toString()}`,
},
session: {
key: ONYXKEYS.SESSION,
},
personalDetailsList: {
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
}),
)(PrivateNotesViewPage); Rather than making API call from useEffect, we should actually create a new HOC called Changes in PrivateNotesEditPageThis will be exactly similar to PrivateNotesViewPage Solution videosAfter applying the solution, here are the videos of different scenarios: Valid.report.with.notes.mp4Invalid report: Invalid.report.mp4Valid report without notes: Valid.report.without.notes.mp4What alternative solutions did you explore? (Optional)Solution exploration 1Instead of using Solution exploration 2Follow below pattern
This allows showing |
Regarding @dukenv0307 solution, I checked(using console logs) that in the
Because of this, we first see |
@salonikumawat28 When subscribing to |
@salonikumawat28 In your solution when opening the "My Notes" deep link there is |
@dukenv0307 We always trying to follow the pattern to avoid early returns with |
@ArekChr I will update my proposal. Just a note in my proposal: we should set default |
ProposalUpdate proposal Please re-state the problem that we are trying to solve in this issue.Not found page display briefly when we access the What is the root cause of that problem?When we access it via deep link, the report needs to load from
What changes do you think we should make in order to solve the problem?We should subscribe
With What alternative solutions did you explore? (Optional)NA ResultScreencast.from.17-09-2023.22.14.43.webm |
@ArekChr Updated proposal. |
ProposalUpdated Proposal Side note: I have updated the proposal including fix for |
@ArekChr have you reviewed the proposals and/or have comments on them? |
@ArekChr @MonilBhavsar I have raised the PR: #29636 |
@ArekChr @MonilBhavsar
What are your thoughts on this reevaluation request? |
@ArekChr Do you know who can help with the reevaluation request as asked above? |
@ArekChr @MonilBhavsar do you have any comments on the message from @salonikumawat28 |
@MonilBhavsar, @abekkala, I agree with the reevaluation. The extra work done on |
PR was merged! 🚀 |
@MonilBhavsar Thanks for merging the PR and agreeing with the reevaluation request. |
@MonilBhavsar Because of above reasons and multiple merge conflicts, our timeline for PR was exceeded and as per rules, the contract is in danger of termination. In addition, even though the issue was assigned to me, I didn't receive the upwork offer for it till now. Given these reasons, is it possible to get a exception and still receive the contact amount? |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
Above deploy blocker is now removed and no longer a deploy blocker. In addition, the issue is unrelated to this pull request's changes. |
@MonilBhavsar Any thoughts on this? |
I support this reasoning. PR was actively being worked on, we did increase the scope and revewing and addressing comments back and forth took some time. cc @abekkala |
@abekkala Since PR is deployed to prod, can you help in looking at reevaluation request and relaxing timeline request (which is approved by Monil and Arkadiusz in above comments)? |
@abekkala Can you help with the above comment? |
@ArekChr @MonilBhavsar Is there anyone else who can help here as there's no response from @abekkala ? |
Yes, this was discussed with @MonilBhavsar I don't see that the issue was auto-updated by melvin with payment date When I review the GH it looks like payouts will be to:
|
@abekkala As @MonilBhavsar and @ArekChr also agreed that given the additional efforts, this issue should be reevaluated for the payment, can you help with that? |
@abekkala Check here for @MonilBhavsar comment agreeing for reevaluation. |
Yes, I'm discussing the payment with Monil. |
@salonikumawat28 Would you like me to send that in Upwork now? |
@abekkala thanks for the reevaluation. Yes, let's do that. |
lol - yeah, I noticed that after that he is part of CS |
Issue reported by: @dukenv0307 [$50] paid and contract ended - thank you! 🎉 |
@abekkala thanks for the offer. Accepted offer and requested payment. Can you help me by giving a review in upwork in addition to releasing payment? Review will help me in building my profile. Thanks for the help. |
@salonikumawat28 yes, reviews are always done once we process payment and end contract. 🎉 |
@salonikumawat28 payment sent and contract ended - thank you! 🎉 |
@abekkala Thanks for the review and payment 🎉 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Not found page shouldn't display briefly
Actual Result:
Not found page display briefly
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.71.4
Reproducible in staging?: yes
Reproducible in production?: new feature
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Screen.Recording.2023-09-19.at.01.38.34.mov
Recording.4585.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dukenv0307
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694962751826829
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: