Skip to content

[HOLD for payment 2024-01-18] [$500] Private Note - The message 'Hmm... it's not here' displays instead of Skeleton UI when viewing Private Notes in Offline Mode. #30246

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.3.90.1
Reproducible in staging?: y
Reproducible in production?: y
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
Expensify/Expensify Issue URL:
Issue reported by: @tranvantoan-qn
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697131558107909

Action Performed:

  1. Log in to any Account.
  2. Disable the network connection to switch to OFFLINE mode.
  3. Open any chat and select a Contact to view their details.
  4. Click on "Private Notes"
  5. Observation: You will see the message "Hmm... it's not here" displayed.

Expected Result:

A Skeleton UI should be displayed, as it is a general concept applied when the data is loading.

Actual Result:

Instead of a Skeleton UI, the message "Hmm... it's not here" is displayed.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native
Android: mWeb Chrome
Android.-.Chrome.4.mov
iOS: Native
Ios.-.Native.5.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS.-.Safari.4.mov
MacOS.-.Chrome.5.mp4
MacOS: Desktop
MacOS.-.Desktop.3.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cb01f2ab30a52085
  • Upwork Job ID: 1716795251231830016
  • Last Price Increase: 2023-11-07
  • Automatic offers:
    • jjcoffee | Reviewer | 27616931
    • hungvu193 | Contributor | 27616932
    • tranvantoan-qn | Reporter | 27616934

Activity

  1. added
    External
    Daily
    Bug
    on Oct 24, 2023
  2. melvin-bot commented on Oct 24, 2023

    @melvin-bot

    Triggered auto assignment to @puneetlath (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. changed the title [-]Private Note - The message 'Hmm... it's not here' displays instead of Skeleton UI when viewing Private Notes in Offline Mode.[/-] [+][$500] Private Note - The message 'Hmm... it's not here' displays instead of Skeleton UI when viewing Private Notes in Offline Mode.[/+] on Oct 24, 2023
  4. melvin-bot commented on Oct 24, 2023

    @melvin-bot
  5. added
    Help Wanted
    on Oct 24, 2023
  6. melvin-bot commented on Oct 24, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Oct 24, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)

  8. rakshitjain13 commented on Oct 24, 2023

    @rakshitjain13
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    The message 'Hmm... it's not here' displays instead of Skeleton UI when viewing Private Notes in Offline Mode

    What is the root cause of that problem?

    In PrivateNotesListPage.js , should shouldShow become true due to offline mode

    <FullPageNotFoundView
    shouldShow={
    _.isEmpty(report.reportID) ||
    (!report.isLoadingPrivateNotes && network.isOffline && _.isEmpty(lodashGet(report, 'privateNotes', {}))) ||
    ReportUtils.isArchivedRoom(report)
    }
    >

    What changes do you think we should make in order to solve the problem?

    We have to update the condition with !network.isOffline in the above check and show OptionsListSkeletonView when the network is offline and loading

    <FullPageNotFoundView
                    shouldShow={
                        _.isEmpty(report.reportID) ||
                        (!report.isLoadingPrivateNotes && _.isEmpty(lodashGet(report, 'privateNotes', {})) && !network.isOffline) ||
                        ReportUtils.isArchivedRoom(report)
                    }
                >
                    <HeaderWithBackButton
                        title={translate('privateNotes.title')}
                        shouldShowBackButton
                        onCloseButtonPress={() => Navigation.dismissModal()}
                    />
                    <ScrollView contentContainerStyle={styles.flexGrow1}>
                        {(( network.isOffline && _.isEmpty(lodashGet(report, 'privateNotes', {})))|| (report.isLoadingPrivateNotes && _.isEmpty(lodashGet(report, 'privateNotes', {})))) ? (
                              <FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} />
                        ) : (
                            _.map(privateNotes, (item, index) => getMenuItem(item, index))
                        )}
                    </ScrollView>
                </FullPageNotFoundView>
    
    Screen.Recording.2023-10-24.at.6.48.57.PM.mov

    What alternative solutions did you explore? (Optional)

    NA

  9. jjcoffee commented on Oct 24, 2023

    @jjcoffee
    Contributor

    @rakshitjain13 Thanks for the proposal! If we go ahead with this change, I think we'd probably want to always display the skeleton loader instead of the full screen loader otherwise coming back online there'd be an odd transition from Skeleton Loader -> Full Screen Loader -> Notes. cc @Expensify/design for feedback!

  10. rakshitjain13 commented on Oct 24, 2023

    @rakshitjain13
    Contributor

    @jjcoffee Thanks for the feedback and I think your suggestion makes more sense. Hence updated the proposal #30246 (comment)

  11. hungvu193 commented on Oct 25, 2023

    @hungvu193
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    The message 'Hmm... it's not here' displays instead of Skeleton UI when viewing Private Notes in Offline Mode.

    What is the root cause of that problem?

    We currently show NotfoundPage with below condition

    shouldShow={
    _.isEmpty(report.reportID) ||
    (!report.isLoadingPrivateNotes && network.isOffline && _.isEmpty(lodashGet(report, 'privateNotes', {}))) ||
    ReportUtils.isArchivedRoom(report)
    }

    Since we only load when it's not offline, NotFoundPage will be shown in this case.

    if (network.isOffline && report.isLoadingPrivateNotes) {
    return;
    }
    Report.getReportPrivateNote(report.reportID);

    What changes do you think we should make in order to solve the problem?

    Create a variable call isReconnecting:

        const prevIsOffline = usePrevious(network.isOffline);
        const isReconnecting =  prevIsOffline && !network.isOffline;

    Show the loading indicator or skeleton instead of blocking user from using it (similar to other places like Address or WorkspaceMembers). So we need to update shouldShow props of FullPageNotFoundView. Also update the condition of

     shouldShow={
                        _.isEmpty(report.reportID) ||
                        (!report.isLoadingPrivateNotes && !network.isOffline && !isReconnecting && _.isEmpty(lodashGet(report, 'privateNotes', {}))) ||
                        ReportUtils.isArchivedRoom(report)
                    }
     {(report.isLoadingPrivateNotes && _.isEmpty(privateNotes) || ((network.isOffline || isReconnecting) && _.isEmpty(privateNotes))) ? (
                            <FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} />
                        ) : (
                            _.map(privateNotes, (item, index) => getMenuItem(item, index))
                        )}

    What alternative solutions did you explore? (Optional)

    Similar above but we will add a new variable called isLoadingPrivateNote and default to true.

    const isLoadingPrivateNotes = lodashGet(report, 'isLoadingPrivateNotes', true);
    

    After that replace the report.isLoadingPrivateNotes with isLoadingPrivateNotes

  12. 53 remaining items

  13. jjcoffee commented on Jan 18, 2024

    @jjcoffee
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: Fix: Private notes page shows not found in offline mode #28461
    • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/28461/files#r1457057393
    • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A - just needed more thorough testing
    • Determine if we should create a regression test for this bug. Yes
    • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

    Regression Test Proposal

    1. Open the app and go offline
    2. Open any chat which has private notes and tap on the header to open the chat details
    3. Tap on "Private Notes"
    4. Verify that a loader displays
    5. Go back online
    6. Verify that the notes are populated

    Do we agree 👍 or 👎

  14. jjcoffee commented on Jan 18, 2024

    @jjcoffee
    Contributor

    Note that there's an outstanding regression that is waiting on @hungvu193's input.

  15. puneetlath commented on Jan 19, 2024

    @puneetlath
    Contributor

    @hungvu193 are you planning to handle that shortly? We won't be able to pay this one out until you do.

  16. hungvu193 commented on Jan 21, 2024

    @hungvu193
    Contributor

    @hungvu193 are you planning to handle that shortly? We won't be able to pay this one out until you do.

    Cool. I'm on it.

  17. melvin-bot commented on Jan 30, 2024

    @melvin-bot

    @puneetlath, @hungvu193, @jjcoffee Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

  18. jjcoffee commented on Jan 30, 2024

    @jjcoffee
    Contributor

    The PR that fixes the regression is merged by the way (not hit production yet).

  19. jjcoffee commented on Jan 31, 2024

    @jjcoffee
    Contributor

    Deployed to production! @puneetlath Can we update the HOLD for payment here to 2024-02-07? Thanks!

  20. melvin-bot commented on Feb 5, 2024

    @melvin-bot

    @puneetlath, @hungvu193, @jjcoffee Huh... This is 4 days overdue. Who can take care of this?

  21. melvin-bot commented on Feb 7, 2024

    @melvin-bot

    @puneetlath, @hungvu193, @jjcoffee 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  22. puneetlath commented on Feb 7, 2024

    @puneetlath
    Contributor

    All paid. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions