Skip to content
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

[HOLD for payment 2024-06-28] [$125] [Search v1] No background color placeholder exists for receipt thumbnail #43393

Closed
luacmartins opened this issue Jun 10, 2024 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@luacmartins
Copy link
Contributor

luacmartins commented Jun 10, 2024

Coming from this thread, the receipt thumbnail doesn't have a placeholder background color.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019803a773929eed48
  • Upwork Job ID: 1800191951832943611
  • Last Price Increase: 2024-06-10
  • Automatic offers:
    • dukenv0307 | Reviewer | 102688635
    • Krishna2323 | Contributor | 102688638
Issue OwnerCurrent Issue Owner: @trjExpensify
@luacmartins luacmartins added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 10, 2024
@luacmartins luacmartins self-assigned this Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

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

@shawnborton
Copy link
Contributor

The color should be the same that we use for the empty state thumbnail:
CleanShot 2024-06-10 at 17 41 16@2x

Which probably means we need to consider the hover state too - I think we bump that background color a shade up when the expense or report row is hovered.

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

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

@melvin-bot melvin-bot bot changed the title [Search v1] No background color placeholder exists for receipt thumbnail [$250] [Search v1] No background color placeholder exists for receipt thumbnail Jun 10, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

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

@luacmartins luacmartins changed the title [$250] [Search v1] No background color placeholder exists for receipt thumbnail [$125] [Search v1] No background color placeholder exists for receipt thumbnail Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

Upwork job price has been updated to $125

@Krishna2323
Copy link
Contributor

@shawnborton, can you help me understand the issue? Where do we need the bg, on the container which shows the existing receipt?

image

@shawnborton
Copy link
Contributor

Take a look at this screenshot, notice how before the receipt loads, there is no background color for the container and thus it looks like a giant blank space:

IMG_0142

@Krishna2323
Copy link
Contributor

Thanks a lot, understood

@Krishna2323
Copy link
Contributor

Krishna2323 commented Jun 10, 2024

Proposal

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

[Search v1] No background color placeholder exists for receipt thumbnail

What is the root cause of that problem?

No bg is applied to the container.

<View style={[StyleUtils.getWidthAndHeightStyle(variables.h36, variables.w40), StyleUtils.getBorderRadiusStyle(variables.componentBorderRadiusSmall), styles.overflowHidden]}>

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

Add the same bg used for the thumbnail. We can use isHovered ? styles.activeComponentBG : styles.hoveredComponentBG,, or we can simply use styles.activeComponentBG without checking for hovered state.

What alternative solutions did you explore? (Optional)

@Krishna2323
Copy link
Contributor

@shawnborton, do we need to change the bg on hover? I think we shouldn't do that because the empty receipt placeholder also does not change its bg on hover.

Monosnap.screencast.2024-06-10.21-48-11.mp4

@shawnborton
Copy link
Contributor

Ah okay, then if that's the case, let's just use that same exact BG color from your screenshot.

@TheGithubDev
Copy link

TheGithubDev commented Jun 10, 2024

Proposal

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

The problem is that no background color placeholder exists for the receipt thumbnail in the Search tab, resulting in a visually inconsistent user experience when the receipt thumbnail is not loaded.

What is the root cause of that problem?

The root cause of this problem is that no background color is applied to the container of the receipt thumbnail. The relevant code snippet is:

<View style={[StyleUtils.getWidthAndHeightStyle(variables.h36, variables.w40), StyleUtils.getBorderRadiusStyle(variables.componentBorderRadiusSmall), styles.overflowHidden]}>

The container lacks a background color style, which causes it to appear blank when the thumbnail is not loaded.

What changes do you think we should make in order to solve the problem?
We should add a background color to the container of the receipt thumbnail. The background color can be applied by modifying the style to include a background color from the existing styles. Here are the specific changes:

  1. Add Background Color Style:
    • Apply a background color style to the container of the receipt thumbnail. This can be done by using a background color from the existing styles, such as styles.activeComponentBG or styles.hoveredComponentBG.

Example of how the changes might look:

<View style={[
    StyleUtils.getWidthAndHeightStyle(variables.h36, variables.w40), 
    StyleUtils.getBorderRadiusStyle(variables.componentBorderRadiusSmall), 
    styles.overflowHidden,
    styles.activeComponentBG // Added background color
]}>

Alternatively, if you want to handle the hovered state:

<View style={[
    StyleUtils.getWidthAndHeightStyle(variables.h36, variables.w40), 
    StyleUtils.getBorderRadiusStyle(variables.componentBorderRadiusSmall), 
    styles.overflowHidden,
    isHovered ? styles.activeComponentBG : styles.hoveredComponentBG // Conditional background color based on hover state
]}>

What alternative solutions did you explore?

  1. Using a Default Image Placeholder: Instead of a solid background color, a default image or icon could be used as a placeholder. This would provide a more visually appealing placeholder but might require additional assets and logic to handle the image.

  2. Implementing a Loading Spinner: Adding a loading spinner or skeleton loader within the container until the thumbnail is fully loaded. This approach enhances user feedback but could complicate the loading logic.

  3. CSS Gradients: Using CSS gradients as a background to provide a more visually interesting placeholder. This approach could improve aesthetics but might not be consistent with the rest of the app's design language.

After considering these alternatives, applying a simple background color using styles.activeComponentBG could be deemed the most straightforward and consistent solution, ensuring a seamless user experience without introducing additional complexity.

Please note that the above explanation outlines only the technical approach I plan to take. If my proposal gets accepted, I will submit the finalized solution as mentioned.

Thanks!

@dukenv0307
Copy link
Contributor

Let's go with @Krishna2323's proposal. We need to add clear steps on the PR phase (try with offline mode)

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jun 11, 2024

Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@luacmartins
Copy link
Contributor Author

I think the proposal looks good, but @Krishna2323 please note that we removed the hover state from the receipt component and are now just using theme.border color for the background, we should use that.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

📣 @dukenv0307 🎉 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 Jun 11, 2024

📣 @Krishna2323 🎉 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 📖

@dukenv0307
Copy link
Contributor

@Krishna2323 Waiting for your PR

@Krishna2323
Copy link
Contributor

@dukenv0307, PR ready for review.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 21, 2024
@melvin-bot melvin-bot bot changed the title [$125] [Search v1] No background color placeholder exists for receipt thumbnail [HOLD for payment 2024-06-28] [$125] [Search v1] No background color placeholder exists for receipt thumbnail Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.85-7 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 2024-06-28. 🎊

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

Copy link

melvin-bot bot commented Jun 21, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@dukenv0307] The PR that introduced the bug has been identified. Link to the PR:
  • [@dukenv0307] 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:
  • [@dukenv0307] 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:
  • [@dukenv0307] Determine if we should create a regression test for this bug.
  • [@dukenv0307] 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.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jun 27, 2024
@trjExpensify
Copy link
Contributor

I don't think we need a regression test for this, and it was a cheeky bug in a new feature release.

Payment summary as follows:

Paid both, closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants