Skip to content

[Due for payment 2025-03-24] [$1000] Feature request: Allow for dragging and dropping a receipt file onto the expense without having to first click into the graphic. #53089

Closed

Description

@m-natarajan

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: 9.0.66-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @mallenexpensify
Slack conversation (hyperlinked to channel name): ts_external_expensify_open_source

Action Performed:

  1. Create a manual expense
  2. On submit expense page attempt to drag and drop a receipt

Expected Result:

User able to drag and drop receipt

Actual Result:

User have to click it first then add the receipt and unable to drag and drop

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Snagit 2024 2024-11-22 15 12 19

Recording.796.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021861562318502187449
  • Upwork Job ID: 1861562318502187449
  • Last Price Increase: 2025-02-25
  • Automatic offers:
    • abzokhattab | Contributor | 105129004
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    Weekly
    NewFeature
    on Nov 25, 2024
  2. melvin-bot commented on Nov 25, 2024

    @melvin-bot

    Triggered auto assignment to @strepanier03 (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

  3. melvin-bot commented on Nov 25, 2024

    @melvin-bot

    ⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️

  4. melvin-bot commented on Nov 25, 2024

    @melvin-bot

    Triggered auto assignment to Design team member for new feature review - @shawnborton (NewFeature)

  5. abzokhattab commented on Nov 25, 2024

    @abzokhattab
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-11-25 22:12:40 UTC.

    Proposal

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

    Allow for dragging and dropping a receipt file onto the expense without having to first click into the graphic

    What is the root cause of that problem?

    New Feature

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

    we should embed the empty receipt component in the MoneyRequestConfirmationListFooter with DragAndDropProvider and DragAndDropConsumer

    <ReceiptEmptyState
    onPress={() =>
    Navigation.navigate(
    ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID, Navigation.getActiveRouteWithoutParams()),
    )
    }
    />
    ))}

    similar to how it's done in the ImportSpreadsheet
    {({safeAreaPaddingBottomStyle}) => (
    <DragAndDropProvider setIsDraggingOver={setIsDraggingOver}>
    <View style={[styles.flex1, safeAreaPaddingBottomStyle]}>
    <HeaderWithBackButton
    title={translate('spreadsheet.importSpreadsheet')}
    onBackButtonPress={() => Navigation.navigate(backTo)}
    />
    <View style={[styles.flex1, styles.uploadFileView(isSmallScreenWidth)]}>
    {!(isDraggingOver ?? isDraggingOver) && desktopView}
    <DragAndDropConsumer
    onDrop={(e) => {
    const file = e?.dataTransfer?.files[0];
    if (file) {
    readFile(file);
    }
    }}
    >
    <View style={[styles.fileDropOverlay, styles.w100, styles.h100, styles.justifyContentCenter, styles.alignItemsCenter]}>
    <View style={styles.fileUploadImageWrapper(fileTopPosition)}>

    optionally we can move that inside the ReceiptEmptyState itself so that we can have the same behaviour in the money request view as well

    • in acheive that we need to add a new prop onDrop that will be called on the drop inside the DragAndDropConsumer
    • then when calling the ReceiptEmptyState we should call the same function that is used in the scan (setReceiptAndNavigate) however this function navigates to the confirmation page again as show here which is not needed so to avoid that we can split it into two functions one will return the receipt and the other will set and navigate and we should use set receipt in this case.
    • also the same drag and drop stylings can be used from the scan ReceiptDropUI and the drag provider inside the StepScreenDragAndDropWrapper

    What alternative solutions did you explore? (Optional)

  6. mkzie2 commented on Nov 25, 2024

    @mkzie2
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-11-25 22:31:37 UTC.

    Proposal

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

    User have to click it first then add the receipt and unable to drag and drop

    What is the root cause of that problem?

    Feature request

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

    Replace ScreenWrapper with StepScreenDragAndDropWrapper and use ReceiptDropUI similar to IOURequestStepScan

    <StepScreenDragAndDropWrapper

    <View style={[styles.flex1, !Browser.isMobile() && styles.uploadFileView(isSmallScreenWidth)]}>
    {!(isDraggingOver ?? isDraggingOverWrapper) && (Browser.isMobile() ? mobileCameraView() : desktopUploadView())}
    <ReceiptDropUI

    1. Add more props for StepScreenDragAndDropWrapper to configure HeaderWithBackButton (threeDotsMenuItems-related)
    2. Extract validateReceipt here which returns the error message if any
    3. Extract these parts of setReceiptAndNavigate here to util file.

    The overall code change might be like this:

    <StepScreenDragAndDropWrapper>
      {(isDraggingOverWrapper) => (
        <>
          {isLoading && <FullScreenLoadingIndicator />}
          {!!gpsRequired && <LocationPermissionModal />}
          {!isDraggingOverWrapper && <MoneyRequestConfirmationList />}
          <ReceiptDropUI />
          <ConfirmModal />
        </>
      )}
    </StepScreenDragAndDropWrapper>
  7. added
    Daily
    and removed
    Weekly
    on Nov 25, 2024
  8. shawnborton commented on Nov 25, 2024

    @shawnborton
    Contributor

    This seems pretty straightforward to me, perhaps we can just reuse the same styles we get when you go to upload a receipt from the Scan flow?

  9. added
    Reviewing
    on Nov 25, 2024
  10. 138 remaining items

  11. Ollyws commented on Mar 29, 2025

    @Ollyws
    Contributor

    @mallenexpensify was the price of this not bumped to $1000 (#53089 (comment)) or was that in error?

  12. added
    Bug
    on Apr 1, 2025
  13. melvin-bot commented on Apr 1, 2025

    @melvin-bot

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

  14. luacmartins commented on Apr 1, 2025

    @luacmartins
    Contributor

    @dylanexpensify the payment summary here is incorrect since the issue had been bumped to $1000. Could you please assist in making the correct payments since @mallenexpensify is ooo?

  15. dylanexpensify commented on Apr 2, 2025

    @dylanexpensify
    Contributor
  16. dylanexpensify commented on Apr 2, 2025

    @dylanexpensify
    Contributor

    Done!

  17. Ollyws commented on Apr 2, 2025

    @Ollyws
    Contributor

    Requested on ND.

  18. garrettmknight commented on Apr 10, 2025

    @garrettmknight
    Contributor

    $1000 approved for @Ollyws

  19. garrettmknight commented on Apr 22, 2025

    @garrettmknight
    Contributor

    $1000 approved for @shubham1206agra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternalNewFeature

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions