Skip to content

[HOLD for payment 2023-08-08] [$1000] Web - The Not Allowed sign is not shown when dragging & dropping attachments if the settings or search bar is open #22305

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to settings
  2. Drag and drop a file.
  3. Notice that the Not Allowed sign is not shown and when you drop it, the attachment is opened in a new tab.

Expected Result:

Not allowed sign is not shown

Actual Result:

Not allowed sign is shown

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.36-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Test57_Drag.Drop-1.mp4
Recording.3434.mp4

Expensify/Expensify Issue URL:
Issue reported by: @daveSeife
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688503808253309

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010c9a4080884f501d
  • Upwork Job ID: 1678901220787363840
  • 2023-07-19
  • Automatic offers:
    • ishpaul777 | Contributor | 25726938
    • daveSeife | Reporter | 25726939

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 5, 2023
  2. melvin-bot commented on Jul 5, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jul 5, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. ishpaul777 commented on Jul 8, 2023

    @ishpaul777
    Contributor

    Proposal

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

    Web - The Not Allowed sign is not shown when dragging & dropping attachments if the settings or search bar is open

    What is the root cause of that problem?

    The current behaviour of dragover event datatransfer dropeffect is "copy" on setting screens.

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

    We need to add a eventlistner for dragover and set e.datatransfer.dropeffect = "none" in callback function when the right sidebar renders

    Ref- https://codepen.io/SitePoint/pen/epQPNP

    Here is What we need to do:

    1. Create a NoDropZone component( this will just render the children passed as Prop. and apply dragover eventListner with
      e.datatransfer.dropeffect = "none"

    only on web we apply the eventListner. on Native it will render the children only similar to what we have Done with DropZone component.

    // /components/DragAndDrop/NoDropZone/index.js
    
    import { useEffect } from 'react';
    import PropTypes from 'prop-types';
    
    const propTypes = {
    	/** Content */
    	children: PropTypes.node.isRequired,
    };
    
    function NoDropZone(props) {
    
    	useEffect(() => {
    		document.addEventListener('dragover', handleDragOver);
    
    		return () => {
    			document.removeEventListener('dragover', handleDragOver);
    		};
    	}, []);
    
    
    	function handleDragOver(event) {
    		event.preventDefault();
    		event.dataTransfer.dropEffect = 'none';
    	}
    
    
    	return props.children;
    }
    
    NoDropZone.displayName = 'NoDropZone';
    NoDropZone.propTypes = propTypes;
    
    export default NoDropZone;
    // /components/DragAndDrop/NoDropZone/index.native.js
    
    const NoDropZone = (props) => props.children;
    
    NoDropZone.displayName = 'NoDropZone';
    
    export default NoDropZone;
    1. Wrap the RHN with NoDropZone component.

    Result-

    https://www.loom.com/share/301ba3610bc845fda18b3c0fa977335b?sid=39f313e6-45e8-41a8-9ede-9fa251cd3a0e

    What alternative solutions did you explore? (Optional)

    we can add a eventlistner for both dragover and drop and event.preventDefault() on both listners it fails the drop gracefully(no new Tab opens) but the native cursor style for drop not-allowed (🚫 with white box) of windows, it still shows +Copy which indicates user can drop the file.

  5. melvin-bot commented on Jul 11, 2023

    @melvin-bot

    @michaelhaxhiu Huh... This is 4 days overdue. Who can take care of this?

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 11, 2023
  7. changed the title [-]Web - The Not Allowed sign is not shown when dragging & dropping attachments if the settings or search bar is open[/-] [+][$1000] Web - The Not Allowed sign is not shown when dragging & dropping attachments if the settings or search bar is open[/+] on Jul 11, 2023
  8. melvin-bot commented on Jul 11, 2023

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 11, 2023
  10. melvin-bot commented on Jul 11, 2023

    @melvin-bot

    Current assignee @michaelhaxhiu is eligible for the External assigner, not assigning anyone new.

  11. melvin-bot commented on Jul 11, 2023

    @melvin-bot

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

  12. 75 remaining items

  13. self-assigned this
    on Aug 4, 2023
  14. michaelhaxhiu commented on Aug 4, 2023

    @michaelhaxhiu
    Contributor

    Note: I'm preparing to go OOO for ~2 weeks and need a BZ buddy to watch over this in the meantime. 🙏

    Next steps:

    I'll take this over when I return if it's not complete. Thanks in advance @sakluger

  15. ishpaul777 commented on Aug 4, 2023

    @ishpaul777
    Contributor

    @michaelhaxhiu according to guidelines, isn't it just dock the speed bonus because of regression, i couldn't find the penalty for regression in docs

  16. michaelhaxhiu commented on Aug 4, 2023

    @michaelhaxhiu
    Contributor

    https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#payment-for-contributions

    A 50% penalty will be applied to the Contributor and Contributor+ for each regression on an issue.

  17. ishpaul777 commented on Aug 4, 2023

    @ishpaul777
    Contributor

    found it! I beleive this is added recently so i missed it! Thanks @michaelhaxhiu

  18. added and removed on Aug 6, 2023
  19. deleted a comment from melvin-bot on Aug 7, 2023
  20. sakluger commented on Aug 7, 2023

    @sakluger
    Contributor

    I went ahead and paid @daveSeife for the bug report today. Tomorrow is the payment date for the rest assuming no more issues arise.

    @robertKozik could you please complete the BugZero checklist (GH comment) when you have some time so that we can close this issue out after payment? Thanks!

  21. daveSeife commented on Aug 8, 2023

    @daveSeife

    @sakluger I have received the payment, thank you!

  22. robertKozik commented on Aug 8, 2023

    @robertKozik
    Contributor

    @sakluger I'm not sure whether I filled it right, as this issue was not fixing any regression (only caused one 🥲). Ping me if it should be filled another way

    • [@robertKozik] The PR that introduced the bug has been identified. Link to the PR: This PR was not fixing the regression
    • [@robertKozik] 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: N/A
    • [@robertKozik] 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: N/A
    • [@robertKozik] Determine if we should create a regression test for this bug. per @dangrous comment YES
    • [@robertKozik] 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.
    1. Go to settings
    2. Drag and drop a file.
    3. Verify that file cannot be dropped

    Edited

  23. dangrous commented on Aug 8, 2023

    @dangrous
    Contributor

    So you're right about it not being a regression, I believe. For the regression test, we might want to add one though - basically the testing steps in this issue. Thanks!

  24. ishpaul777 commented on Aug 9, 2023

    @ishpaul777
    Contributor

    Bump @sakluger for pay reminder. Thanks!

  25. sakluger commented on Aug 9, 2023

    @sakluger
    Contributor

    Completed payment including 50% penalty for the regression.

    @robertKozik thanks for filling out the checklist and writing out regression steps, looks perfect!

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

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions