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 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
1 of 6 tasks
kbecciv opened this issue Jul 5, 2023 · 65 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

@kbecciv
Copy link

kbecciv commented Jul 5, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Jul 7, 2023
@ishpaul777
Copy link
Contributor

ishpaul777 commented Jul 8, 2023

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.

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

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

@michaelhaxhiu michaelhaxhiu added the External Added to denote the issue can be worked on by a contributor label Jul 11, 2023
@melvin-bot melvin-bot bot 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 Jul 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

Job added to Upwork: https://www.upwork.com/jobs/~010c9a4080884f501d

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

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

@michaelhaxhiu
Copy link
Contributor

This is indeed External, but I don't agree with the Expected Result as it stands -- it's not specific enough.

Expected Result:

Not allowed sign is not shown

What would be the best UX when dragging & dropping a file with the RHN/chatswitcher expanded?

@melvin-bot melvin-bot bot removed the Overdue label Jul 11, 2023
@michaelhaxhiu michaelhaxhiu added Overdue and removed External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Jul 11, 2023
@melvin-bot melvin-bot bot removed the Overdue label Jul 11, 2023
@michaelhaxhiu
Copy link
Contributor

Ok I'm gonna take a small step backward, and removing all assignments until we get clear on the Expected Result. I posted on the slack thread to converse further.

@melvin-bot
Copy link

melvin-bot bot commented Jul 12, 2023

📣 @TopTen1310! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot
Copy link

melvin-bot bot commented Jul 12, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@ishpaul777
Copy link
Contributor

This is indeed External, but I don't agree with the Expected Result as it stands -- it's not specific enough.

Expected Result:

Not allowed sign is not shown

What would be the best UX when dragging & dropping a file with the RHN/chatswitcher expanded?

@michaelhaxhiu we can either just close the RHN when file is dragged over or show the drop not allowed cursor.

@melvin-bot melvin-bot bot added the Overdue label Jul 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 17, 2023

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

@michaelhaxhiu
Copy link
Contributor

michaelhaxhiu commented Jul 18, 2023

@ishpaul777 hmm collapsing the RHN could be a possible option. I feel like we should probably just match what we do on the desktop app ultimately (e.g. it just silently fails, and nothing changes unless you close the RHN).

So basically, looking below, we'd potentially remove the behavior from step 4 in bold so web matches desktop?

  1. You are in a DM or group chat
  2. RHN is expanded (search)
  3. You click & drag an attachment into new expensify
  4. A new tab opens up
  5. The image fails to upload

On other websites, I have seen this exact same kind of behavior whereby a click & drag image upload will open a new tab. I'm not sure if it's fixable on web (as I'm not an engineer) but let's get C+ input too.

@melvin-bot melvin-bot bot removed the Overdue label Jul 18, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - The Not Allowed sign is not shown when dragging & dropping attachments if the settings or search bar is open [HOLD for payment 2023-08-07] [$1000] Web - The Not Allowed sign is not shown when dragging & dropping attachments if the settings or search bar is open Jul 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.47-6 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 2023-08-07. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

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:

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

@dangrous
Copy link
Contributor

Thanks for clarifying @dangrous. Can you please clarify what's the impact of this regression on compensation?

So this will dock the pay due to the regression, unfortunately. (cc @michaelhaxhiu) Technically the 7 days also resets, though that's moot here since I think it was the same day

@ishpaul777
Copy link
Contributor

Understood! Thanks for clarification.

@michaelhaxhiu michaelhaxhiu removed the Bug Something is broken. Auto assigns a BugZero manager. label Aug 4, 2023
@michaelhaxhiu michaelhaxhiu removed their assignment Aug 4, 2023
@michaelhaxhiu michaelhaxhiu added the Bug Something is broken. Auto assigns a BugZero manager. label Aug 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 4, 2023
@michaelhaxhiu michaelhaxhiu changed the title [HOLD for payment 2023-08-07] [$1000] Web - The Not Allowed sign is not shown when dragging & dropping attachments if the settings or search bar is open [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 Aug 4, 2023
@michaelhaxhiu michaelhaxhiu self-assigned this Aug 4, 2023
@michaelhaxhiu
Copy link
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

@ishpaul777
Copy link
Contributor

ishpaul777 commented Aug 4, 2023

@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

@michaelhaxhiu
Copy link
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.

@ishpaul777
Copy link
Contributor

ishpaul777 commented Aug 4, 2023

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Aug 6, 2023
@Expensify Expensify deleted a comment from melvin-bot bot Aug 7, 2023
@sakluger
Copy link
Contributor

sakluger commented Aug 7, 2023

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!

@daveSeife
Copy link

@sakluger I have received the payment, thank you!

@robertKozik
Copy link
Contributor

robertKozik commented Aug 8, 2023

@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

@dangrous
Copy link
Contributor

dangrous commented Aug 8, 2023

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!

@ishpaul777
Copy link
Contributor

Bump @sakluger for pay reminder. Thanks!

@sakluger
Copy link
Contributor

sakluger commented Aug 9, 2023

Completed payment including 50% penalty for the regression.

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

@sakluger sakluger closed this as completed Aug 9, 2023
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
None yet
Development

No branches or pull requests

9 participants