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-20] [HOLD for payment 2024-06-18] [$250] IOU Scan - In dark mode, the damaged PDF - file is barely visible #39356

Closed
1 of 6 tasks
lanitochka17 opened this issue Apr 1, 2024 · 39 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

@lanitochka17
Copy link

lanitochka17 commented Apr 1, 2024

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: 1.4.58-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4467055
Issue reported by: Applause - Internal Team

Action Performed:

Pre-condition:use dark mode

  1. Go to https://staging.new.expensify.com/home
  2. Tap on workspace chat
  3. Tap plus icon -- request money -- scan
  4. Upload corrupt pdf attached below

Expected Result:

In dark mode, failed to load pdf message must be clearly visible while uploading corrupt pdf

Actual Result:

In dark mode, failed to load pdf message is barely visible while uploading corrupt pdf

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

Add any screenshot/video evidence

Bug6434200_1711975273611.sis.mp4

Bug6434200_1711975504736!IMG_20240401_181455

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01caa5c1b848d17f6b
  • Upwork Job ID: 1778050286258974720
  • Last Price Increase: 2024-04-10
  • Automatic offers:
    • jayeshmangwani | Reviewer | 0
    • Krishna2323 | Contributor | 0
Issue OwnerCurrent Issue Owner: @JmillsExpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 1, 2024
Copy link

melvin-bot bot commented Apr 1, 2024

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

@lanitochka17
Copy link
Author

@JmillsExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@Krishna2323
Copy link
Contributor

Krishna2323 commented Apr 1, 2024

Proposal

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

IOU Scan - In dark mode, the damaged PDF - file is barely visible

What is the root cause of that problem?

The root cause it that the Document is using the default styles for showing the error message since we haven't added our custom component using error prop.

<Document
loading={<FullScreenLoadingIndicator />}
file={isAuthTokenRequired ? addEncryptedAuthTokenToURL(previewSourceURL) : previewSourceURL}
options={{
cMapUrl: 'cmaps/',
cMapPacked: true,
}}
externalLinkTarget="_blank"
onPassword={onPassword}
>

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

We need to add the custom component like we do in WebPDFDocument.

<Document
loading={<FullScreenLoadingIndicator />}
error={<Text style={errorLabelStyles}>{translate('attachmentView.failedToLoadPDF')}</Text>}
file={sourceURL}

We might want to add default styles like textLabel but that can be discussed. Additionally we can errorLabelStyles just like we do in WebPDFDocument. Styling changes can be discussed.

Styles we use in AttachmentView.

errorLabelStyles={isUsedInAttachmentModal ? [styles.textLabel, styles.textLarge] : [styles.cursorAuto]}

Result

fix_pdf_font_light fix_pdf_font

@Krishna2323
Copy link
Contributor

Proposal Updated.

  • Added style reference

@dragnoir
Copy link
Contributor

dragnoir commented Apr 1, 2024

Proposal

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

In dark mode, the damaged PDF - text missing style

What is the root cause of that problem?

We can see how the same component in some places of the app, text is white and other areas, the text is dark.
image

The used component Document, grab the style for the text color from the nearest parent component that sets the style for the text.

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

We should encapsulate the Document component within a View that applies the necessary styling to the text. By doing this, we ensure consistent text styling across all instances where the PDFThumbnail component is used.

As example we can use

+ <View  style={[styles.textVersion]}>
    <Document
      loading={<FullScreenLoadingIndicator  />}

POC:
image

@dragnoir
Copy link
Contributor

dragnoir commented Apr 1, 2024

cc @Expensify/design for thought on how to style the Failed to load PDF file. text!

@melvin-bot melvin-bot bot added the Overdue label Apr 5, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

@JmillsExpensify Still overdue 6 days?! Let's take care of this!

@JmillsExpensify
Copy link

I think this is a good one to tackle as part of #wave-collect so I'm adding to that project.

@melvin-bot melvin-bot bot removed the Overdue label Apr 10, 2024
@JmillsExpensify JmillsExpensify added the External Added to denote the issue can be worked on by a contributor label Apr 10, 2024
@melvin-bot melvin-bot bot changed the title IOU Scan - In dark mode, the damaged PDF - file is barely visible [$250] IOU Scan - In dark mode, the damaged PDF - file is barely visible Apr 10, 2024
Copy link

melvin-bot bot commented Apr 10, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 10, 2024
Copy link

melvin-bot bot commented Apr 10, 2024

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

@jayeshmangwani
Copy link
Contributor

Thanks for the proposals @Krishna2323 @dragnoir . I like the idea of adding the custom error Text component to the Document component; we can go with @Krishna2323 's Proposal.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 11, 2024

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

Copy link

melvin-bot bot commented Apr 15, 2024

@JmillsExpensify @jayeshmangwani @hayata-suenaga this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@jayeshmangwani
Copy link
Contributor

@hayata-suenaga What's your opinion on the proposal ?

@melvin-bot melvin-bot bot removed the Overdue label Apr 15, 2024
Copy link

melvin-bot bot commented Apr 15, 2024

@JmillsExpensify, @jayeshmangwani, @hayata-suenaga Whoops! This issue is 2 days overdue. Let's get this updated quick!

@JmillsExpensify
Copy link

Still working through the PR

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Jun 11, 2024
@melvin-bot melvin-bot bot changed the title [$250] IOU Scan - In dark mode, the damaged PDF - file is barely visible [HOLD for payment 2024-06-18] [$250] IOU Scan - In dark mode, the damaged PDF - file is barely visible Jun 11, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

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

Copy link

melvin-bot bot commented Jun 11, 2024

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

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

Copy link

melvin-bot bot commented Jun 11, 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:

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

@Krishna2323
Copy link
Contributor

@JmillsExpensify, this issue was created before announcement, can you pls update the bounty? Thanks

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 13, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-06-18] [$250] IOU Scan - In dark mode, the damaged PDF - file is barely visible [HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] IOU Scan - In dark mode, the damaged PDF - file is barely visible Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 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-20. 🎊

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

Copy link

melvin-bot bot commented Jun 13, 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:

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

@jayeshmangwani
Copy link
Contributor

jayeshmangwani commented Jun 19, 2024

Regression Test Proposal

  1. Open the app and press the FAB menu -> Submit expense -> Scan.
  2. Upload any corrupt PDF.
  3. Select any participant.
  4. Verify that the alert modal is shown with the title 'Attachment Error'.
  5. Verify that the background has a placeholder with a receipt slash component on the confirmation page.

Do we agree 👍 or 👎

@jayeshmangwani
Copy link
Contributor

@JmillsExpensify Is it possible to get paid through NewDot for this job instead of Upwork?
since the issue was created before I was getting paid through ND and I received an Upwork offer. If not, no problem—we can go through Upwork.

@melvin-bot melvin-bot bot added the Overdue label Jun 20, 2024
@JmillsExpensify
Copy link

JmillsExpensify commented Jun 22, 2024

Payment summary:

@melvin-bot melvin-bot bot removed the Overdue label Jun 22, 2024
@Krishna2323
Copy link
Contributor

@JmillsExpensify, this issue was created before announcement, can you pls update the bounty? Thanks

@JmillsExpensify
Copy link

Updated above since this was created a couple of days before the price change. @jayeshmangwani I canceled your Upwork contract. Please submit a request via NewDot.

@jayeshmangwani
Copy link
Contributor

Requested on NewDot

@mallenexpensify
Copy link
Contributor

Contributor: @Krishna2323 paid $500 via Upwork
Contributor+: @jayeshmangwani due $500 via NewDot

@JmillsExpensify
Copy link

$500 approved for @jayeshmangwani

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

8 participants