Skip to content

[Due for payment 2025-07-04] [$250] Reports - No spinner on receipt thumbnail #62036

Closed

Description

@lanitochka17

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: 9.1.45-15
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: #61764
Issue reported by: Applause - Internal Team

Action Performed:

Precondition: account has several expenses with receipts

  1. Navigate to Reports
    2 Make sure you are in Expenses or Expense reports

Expected Result:

The loading spinner displayed for receipt thumbnails.
Default BG color fill for the thumbnail area, and use a 20x20 spinner in the middle of the thumbnail area for these

Actual Result:

No loading spinner displayed for receipt thumbnails

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6831198_1747239274940.bandicam_2025-05-14_18-50-12-819.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021922808396648832547
  • Upwork Job ID: 1922808396648832547
  • Last Price Increase: 2025-05-15
  • Automatic offers:
    • Krishna2323 | Contributor | 107398010
Issue OwnerCurrent Issue Owner: @jliexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 14, 2025
  2. melvin-bot commented on May 14, 2025

    @melvin-bot

    Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. M00rish commented on May 14, 2025

    @M00rish
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-05-14 22:45:33 UTC.

    Proposal

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

    Reports - No spinner on receipt thumbnail

    What is the root cause of that problem?

    no mechanism for showing spinner while loading :

    if (source === undefined && !!forwardedProps?.waitForSession) {
    return undefined;
    }
    if (source === undefined) {
    return (
    <FullScreenLoadingIndicator
    iconSize={loadingIconSize}
    style={loadingIndicatorStyles}
    />
    );
    }
    return (
    <BaseImage
    // eslint-disable-next-line react/jsx-props-no-spreading
    {...forwardedProps}
    onLoad={handleLoad}
    style={[style, shouldSetAspectRatioInStyle && aspectRatio ? {aspectRatio, height: 'auto'} : {}, shouldOpacityBeZero && {opacity: 0}]}
    source={source}
    />

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

    add onLoading state to ReceiptImage :

    function ReceiptImage({
        ...
    
        const styles = useThemeStyles();
        const [isLoading, setIsLoading] = useState(true);
    
        return (
            <>
                {isLoading && (
                    <FullScreenLoadingIndicator
                        iconSize={loadingIconSize}
                        style={loadingIndicatorStyles}
                    />
                )}
                <Image
                    source={{uri: source}}
                    style={[style ?? [styles.w100, styles.h100], styles.overflowHidden]}
                    isAuthTokenRequired={isAuthTokenRequired}
                    onLoad={() => setIsLoading(false)}
                    loadingIconSize={loadingIconSize}
                    loadingIndicatorStyles={loadingIndicatorStyles}
                />
            </>
        );
    }
    
    
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    UI issue

    What alternative solutions did you explore? (Optional)

    add check in Image component based on prop :

       function Image({
           ...
        showLoadingOverlay = false,
        ...forwardedProps
    }: ImageProps) {
        const [isLoading, setIsLoading] = useState(showLoadingOverlay);
       .....
    
        const handleLoad = useCallback(
            (event: ImageOnLoadEvent) => {
                const {width, height} = event.nativeEvent;
                onLoad?.(event);
                updateAspectRatio(width, height);
                if (showLoadingOverlay) {
                    setIsLoading(false);
                }
            },
            [onLoad, updateAspectRatio, showLoadingOverlay],
        );
    .....
    
        return (
            <>
                {showLoadingOverlay && isLoading && (
                    <FullScreenLoadingIndicator
                        iconSize={loadingIconSize}
                        style={loadingIndicatorStyles}
                    />
                )}
                {source !== undefined && (
                    <BaseImage
                        {...forwardedProps}
                        onLoad={handleLoad}
                        style={[
                            style,
                            shouldSetAspectRatioInStyle && aspectRatio ? {aspectRatio, height: 'auto'} : {},
                            shouldOpacityBeZero && {opacity: 0},
                        ]}
                        source={source}
                    />
                )}
            </>
        );
    }
    
  4. jliexpensify commented on May 15, 2025

    @jliexpensify
    Contributor

    cc @Expensify/design to confirm the expected result:

    Default BG color fill for the thumbnail area, and use a 20x20 spinner in the middle of the thumbnail area for these

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 15, 2025
  6. changed the title [-]Reports - No spinner on receipt thumbnail[/-] [+][$250] Reports - No spinner on receipt thumbnail[/+] on May 15, 2025
  7. melvin-bot commented on May 15, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 15, 2025
  9. melvin-bot commented on May 15, 2025

    @melvin-bot

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

  10. dubielzyk-expensify commented on May 15, 2025

    @dubielzyk-expensify
    Contributor

    I think we're in the process of fixing this one on another issue. @shawnborton is involved in it, so I'll let him comment.

  11. shawnborton commented on May 15, 2025

    @shawnborton
    Contributor

    Yeah, we do indeed have another issue for this: #61073

    cc @Valforte @nkdengineer @dominictb for extra eyes

  12. jliexpensify commented on May 15, 2025

    @jliexpensify
    Contributor

    Oh cool, should we close this one?

  13. 46 remaining items

  14. melvin-bot commented on Jun 27, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Jun 27, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.71-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-07-04. 🎊

    For reference, here are some details about the assignees on this issue:

  16. melvin-bot commented on Jun 27, 2025

    @melvin-bot

    @sobitneupane @jliexpensify @sobitneupane The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  17. jliexpensify commented on Jul 4, 2025

    @jliexpensify
    Contributor

    Bump @sobitneupane for the checklist!

    Payment Summary - #62036 (comment)

  18. jliexpensify commented on Jul 4, 2025

    @jliexpensify
    Contributor
  19. huult commented on Jul 4, 2025

    @huult
    Contributor

    @jliexpensify accepted your offer

  20. sobitneupane commented on Jul 4, 2025

    @sobitneupane
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: Transactions - Update Generic Receipts to use ReceiptBackground #34843

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    • Must have expense reports with receipts
    • A report should contain at least one attachment

    Test:

    1. Go to Settings > Troubleshoot
    2. Select Clear Cache and Restart
    3. Select Reset and Refresh
    4. Open a report that contains an attachment
      • Verify that a loader is shown until the image fully loads
    5. Navigate to the Reports page
      • Verify that a loader is shown until all receipts are fully loaded

    Do we agree 👍 or 👎

  21. jliexpensify commented on Jul 6, 2025

    @jliexpensify
    Contributor

    Paid and job closed.

  22. jliexpensify commented on Jul 6, 2025

    @jliexpensify
    Contributor

    @sobitneupane payment summary here

  23. laurenreidexpensify commented on Aug 7, 2025

    @laurenreidexpensify
    Contributor

    $250 approved in New Expensify for @sobitneupane

  24. trjExpensify commented on Aug 14, 2025

    @trjExpensify
    Contributor

    $250 approved in NewDot for @sobitneupane.

    (We changed approvers so this bounced to me!)

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions