Skip to content

[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

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: 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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 1, 2024
  2. melvin-bot commented on Apr 1, 2024

    @melvin-bot

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

  3. lanitochka17 commented on Apr 1, 2024

    @lanitochka17
    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

  4. Krishna2323 commented on Apr 1, 2024

    @Krishna2323
    Contributor

    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
  5. Krishna2323 commented on Apr 1, 2024

    @Krishna2323
    Contributor

    Proposal Updated.

    • Added style reference
  6. dragnoir commented on Apr 1, 2024

    @dragnoir
    Contributor

    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

  7. dragnoir commented on Apr 1, 2024

    @dragnoir
    Contributor

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

  8. melvin-bot commented on Apr 8, 2024

    @melvin-bot

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

  9. JmillsExpensify commented on Apr 10, 2024

    @JmillsExpensify
    Contributor

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

  10. 44 remaining items

  11. melvin-bot commented on Jun 13, 2024

    @melvin-bot

    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:
  12. jayeshmangwani commented on Jun 19, 2024

    @jayeshmangwani
    Contributor

    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 👎

  13. jayeshmangwani commented on Jun 20, 2024

    @jayeshmangwani
    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.

  14. JmillsExpensify commented on Jun 22, 2024

    @JmillsExpensify
    Contributor

    Payment summary:

  15. Krishna2323 commented on Jun 22, 2024

    @Krishna2323
    Contributor

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

  16. JmillsExpensify commented on Jun 22, 2024

    @JmillsExpensify
    Contributor

    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.

  17. jayeshmangwani commented on Jun 22, 2024

    @jayeshmangwani
    Contributor

    Requested on NewDot

  18. mallenexpensify commented on Jun 24, 2024

    @mallenexpensify
    Contributor

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

  19. JmillsExpensify commented on Jun 24, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @jayeshmangwani

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions