-
Notifications
You must be signed in to change notification settings - Fork 3k
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-10-02] [$500] DEV - Web - Console error when user try to drag and drop attachment #27375
Comments
Job added to Upwork: https://www.upwork.com/jobs/~016eba922aef37e232 |
Triggered auto assignment to @johncschuster ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
ProposalProblemDEV - Web - Console error when user try to drag and drop attachment Root CauseWe are initalizing the popover modal ref with null, and dont have a condition to return if Changesmodify const onHideMenu = useCallback(() => {
console.log('Hiding create menu');
if (popoverModal.current) {
popoverModal.current.hideCreateMenu();
}
}, []);
/**
* Method create event listener
*/
const createDragoverListener = () => {
document.addEventListener('dragover', onHideMenu);
};
/**
* Method remove event listener.
*/
const removeDragoverListener = () => {
document.removeEventListener('dragover', onHideMenu);
}; |
@ishpaul777 are you able to reproduce in latest main? |
@0xmiroslav just pulled main and checked issue is not reproducable. |
@johncschuster we can close this |
@0xmiroslav I think the issue here is even though we want to remove the eventlistner when removeDragoverListener is executed the listner never removed because we are passing anonymous while adding and removing listner. Add a console.log in addEventListner, you will realize dragover listner is not removerd when FAB menu is closed. document.addEventListener('dragover', () => {
console.log('dragover')
popoverModal.current.hideCreateMenu()
}); more info - https://stackoverflow.com/questions/10444077/javascript-removeeventlistener-not-working |
@ishpaul777 I am not convinced about your analysis. How does it affect the app? |
The |
right. can you please share app video which demonstrates your concern? Console log is also fine. |
Screen.Recording.2023-09-13.at.11.50.09.PM.mov |
ok good catch. |
Triggered auto assignment to @srikarparsi, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Hi! Yes I do think think this should be fixed as well. Assigning you to the issue @ishpaul777 |
📣 @0xmiroslav 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @ishpaul777 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @gadhiyamanan 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
Hope this would be eligible for efficiency bonus as C+ approved PR in 2 days 10 hrs and there were no changes requested. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.73-1 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-10-02. 🎊 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.
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:
|
Hey! @johncschuster! gentle bump for payment! Thanks |
This was just code optimization, originally console error. So we can skip BZ checklist here. |
Payment has been issued to everyone! Thanks! |
Hey @johncschuster,thank for sending payment, I think the PR is eligible for bonus as #27375 (comment) cc @srikarparsi |
gentle bump @johncschuster on above ^, thanks! |
Reopening to make sure that @johncschuster sees the Q about bonus |
Urgency bonus has been issued to @0xmiroslav and @ishpaul777 |
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:
Expected Result:
It should not show any console error
Actual Result:
Console error appears (Uncaught TypeError: Cannot read properties of null (reading 'hideCreateMenu') )
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: Dev 1.3.67-0
Reproducible in staging?: n
Reproducible in production?: n
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
Screen.Recording.2023-09-11.at.12.08.00.PM.mov
Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694414342648769
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: