Skip to content

[$250] Receipt Loading Spinners on Reports Page Are Too Large #61073

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

Open
4 of 16 tasks
m-natarajan opened this issue Apr 29, 2025 · 16 comments
Open
4 of 16 tasks

[$250] Receipt Loading Spinners on Reports Page Are Too Large #61073

m-natarajan opened this issue Apr 29, 2025 · 16 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Apr 29, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number:
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: @shawnborton
Slack conversation (hyperlinked to channel name): #Expensify Bugs

Action Performed:

  1. Navigate to reports
  2. Make sure you are in Expenses or Expense reports
  3. Observe the loading spinner displayed for receipt thumbnails

Expected Result:

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

Image

Image

Actual Result:

Receipt loading spinners on the Reports page currently appear oversized

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

Image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021919892449136201950
  • Upwork Job ID: 1919892449136201950
  • Last Price Increase: 2025-05-06
  • Automatic offers:
    • dominictb | Reviewer | 107235748
    • nkdengineer | Contributor | 107235749
Issue OwnerCurrent Issue Owner: @Valforte
@m-natarajan m-natarajan added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 29, 2025
Copy link

melvin-bot bot commented Apr 29, 2025

Triggered auto assignment to @greg-schroeder (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.

@nkdengineer
Copy link
Contributor

Proposal

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

Receipt loading spinners on the Reports page currently appear oversized

What is the root cause of that problem?

The loading indicator has size large and fullScreenLoading has bg color is different from default bg color

<View style={[StyleSheet.absoluteFillObject, styles.fullScreenLoading, style]}>
<ActivityIndicator
color={theme.spinner}
size="large"
/>
</View>

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

We should define an iconSize prop on FullscreenLoadingIndicator and a loadingStyle on Image component.

<View style={[StyleSheet.absoluteFillObject, styles.fullScreenLoading, style]}>
<ActivityIndicator
color={theme.spinner}
size="large"
/>
</View>

Then pass it down from here and here to here with iconSize is small to match with design size and loadingStyle is styles.bgTransparent to not override the background color of the receipt cell

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)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

Copy link
Contributor

⚠️ @nkdengineer Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

@FitseTLT
Copy link
Contributor

@shawnborton Can you elaborate this part?

Default BG color fill for the thumbnail area,

@shawnborton
Copy link
Contributor

I added mockups to the "expected results" portion of the OP, that's what we want here, cc @Expensify/design for viz!

@nkdengineer
Copy link
Contributor

@shawnborton The background is the same as the thumbnail image like this, right

Image

@shawnborton
Copy link
Contributor

Correct!

@nkdengineer
Copy link
Contributor

Thanks, got it.

@nabi-ebrahimi
Copy link
Contributor

Proposal

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

Receipt loading spinners on the Reports page currently appear too large and are visually inconsistent with the expected design for thumbnail areas.

What is the root cause of that problem?

The default loading spinner rendered by the Image component is large (size="large") and not well-contained visually due to the opaque or styled background of the wrapper View. Without a transparent background and appropriate size control, the spinner appears oversized and distracting within the compact thumbnail cell.

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

We should make two focused changes:

  1. Apply a transparent background to the View wrapping ReceiptImage by adding styles.bgTransparent. This allows the loading spinner to be displayed cleanly without clashing with the existing background styles.

  2. Introduce a loadingIndicatorSize prop to the ReceiptImage and pass it down to the underlying Image component. This lets us override the default spinner size and explicitly set it to "small" (i.e. 20x20) for thumbnails.

Updated ReceiptCell View: here

<View
    style={[
        StyleUtils.getWidthAndHeightStyle(variables.h36, variables.w40),
        StyleUtils.getBorderRadiusStyle(variables.componentBorderRadiusSmall),
        styles.overflowHidden,
        backgroundStyles,
        styles.bgTransparent
    ]}
>
    <ReceiptImage
        ...
        loadingIndicatorSize="small"
    />
</View>

Changes to Image component:

  • Accept and use loadingIndicatorSize ('small' | 'large') when rendering the ActivityIndicator.
<ActivityIndicator
    color={theme.spinner}
    size={loadingIndicatorSize ?? 'large'} // default remains 'large'
/>

This keeps the design consistent while offering flexibility for other usages of the Image component.

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

N/A

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label May 2, 2025
@greg-schroeder greg-schroeder added the External Added to denote the issue can be worked on by a contributor label May 6, 2025
Copy link

melvin-bot bot commented May 6, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021919892449136201950

@melvin-bot melvin-bot bot changed the title Receipt Loading Spinners on Reports Page Are Too Large [$250] Receipt Loading Spinners on Reports Page Are Too Large May 6, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 6, 2025
Copy link

melvin-bot bot commented May 6, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label May 6, 2025
@Expensify Expensify deleted a comment from melvin-bot bot May 6, 2025
@dominictb
Copy link
Contributor

dominictb commented May 8, 2025

Based on the mockup, we need to apply transparent background to the underlying FullScreenLoadingIndicator, not to the ReceiptCell wrapper, otherwise it would look like this:

Image

@nkdengineer proposal LGTM

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented May 8, 2025

Triggered auto assignment to @Valforte, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@Valforte
Copy link
Contributor

Valforte commented May 8, 2025

Let's move forward with @nkdengineer proposal!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 8, 2025
Copy link

melvin-bot bot commented May 8, 2025

📣 @dominictb 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented May 8, 2025

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants