You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[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
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
@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
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.
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.
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.
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] 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: This is not needed here; it's a design bug that can be been solved on PDF error flow
[@jayeshmangwani] Determine if we should create a regression test for this bug. Yes
[@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.
Regression Test Proposal
Open the app and press the FAB menu -> Submit expense -> Scan.
Upload any corrupt PDF.
Select any participant.
Verify that the alert modal is shown with the title 'Attachment Error'.
Verify that the background has a placeholder with a receipt slash component on the confirmation page.
@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.
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.
Activity
melvin-bot commentedon Apr 1, 2024
Triggered auto assignment to @JmillsExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.lanitochka17 commentedon Apr 1, 2024
@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 commentedon 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
Documentis using the default styles for showing the error message since we haven't added our custom component usingerrorprop.App/src/components/PDFThumbnail/index.tsx
Lines 20 to 29 in 80eb3b7
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.App/src/components/PDFView/WebPDFDocument.js
Lines 96 to 99 in 80eb3b7
We might want to add default styles like
textLabelbut that can be discussed. Additionally we canerrorLabelStylesjust like we do inWebPDFDocument. Styling changes can be discussed.Styles we use in
AttachmentView.App/src/components/Attachments/AttachmentView/index.tsx
Line 173 in c848cb6
Result
Krishna2323 commentedon Apr 1, 2024
Proposal Updated.
dragnoir commentedon 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.

The used component
Document, grab the style for the text color from the nearest parent component that sets the style for the text.App/src/components/PDFThumbnail/index.tsx
Line 20 in aacfa8c
What changes do you think we should make in order to solve the problem?
We should encapsulate the
Documentcomponent within aViewthat applies the necessary styling to the text. By doing this, we ensure consistent text styling across all instances where thePDFThumbnailcomponent is used.As example we can use
+ <View style={[styles.textVersion]}> <Document loading={<FullScreenLoadingIndicator />}POC:

dragnoir commentedon Apr 1, 2024
cc @Expensify/design for thought on how to style the
Failed to load PDF file.text!melvin-bot commentedon Apr 8, 2024
@JmillsExpensify Still overdue 6 days?! Let's take care of this!
JmillsExpensify commentedon Apr 10, 2024
I think this is a good one to tackle as part of #wave-collect so I'm adding to that project.
44 remaining items
melvin-bot commentedon 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 commentedon Jun 19, 2024
Regression Test Proposal
Do we agree 👍 or 👎
jayeshmangwani commentedon Jun 20, 2024
@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.
JmillsExpensify commentedon Jun 22, 2024
Payment summary:
Krishna2323 commentedon Jun 22, 2024
@JmillsExpensify, this issue was created before announcement, can you pls update the bounty? Thanks
JmillsExpensify commentedon Jun 22, 2024
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 commentedon Jun 22, 2024
Requested on NewDot
mallenexpensify commentedon Jun 24, 2024
Contributor: @Krishna2323 paid $500 via Upwork
Contributor+: @jayeshmangwani due $500 via NewDot
JmillsExpensify commentedon Jun 24, 2024
$500 approved for @jayeshmangwani