-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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] [$1000] Console error appears when pressing the "Enter" key after zooming in on an image #25953
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.Console error appears when pressing the "Enter" key after zooming in on an image. What is the root cause of that problem?When we open an image and zoom in on it, the image is focused. When we press enter now, the App/src/components/ImageView/index.js Lines 143 to 158 in ed859eb
Since the offsets are calculated only when zooming in, pressing the enter key when already zoomed in does not throw an error. What changes do you think we should make in order to solve the problem?We need to add a conditional such that if This is the only occurence of an issue with this root cause. What alternative solutions did you explore? (Optional) |
Triggered auto assignment to @conorpendergrast ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Pressing enter after zooming out an image will throw a console error. What is the root cause of that problem?When we click the image to zoom in, the image will now become the focused element. When we press Enter once, it will trigger the App/src/components/ImageView/index.js Line 144 in c169952
So, when we try to destructure the event, it will throw a console error. Both Screen.Recording.2023-08-26.at.14.49.48.movWhat changes do you think we should make in order to solve the problem?In case we press the image with Enter, we can just zoom the image without doing any scrolling.
|
Reviewed, sounds good, let's fix |
Job added to Upwork: https://www.upwork.com/jobs/~012ae65e5538e04b44 |
Current assignee @conorpendergrast is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Pressing enter after zooming out an image will throw a console error. What is the root cause of that problem?The error "Uncaught TypeError: Cannot read properties of undefined (reading 'offsetX')" is happening because the code is trying to access the offsetX property of an object that is undefined. App/src/components/ImageView/index.js Lines 142 to 149 in cf1d50a
In the above code, the object is e.nativeEvent in the onContainerPress function. This object is supposed to contain information about the event that triggered the function, including the offsetX property. Pressing Enter after that will fire a zoom-in, however, using Enter to trigger the onPress isn't a native event What changes do you think we should make in order to solve the problem?The solution is to add a check to ensure that e.nativeEvent is defined and has the necessary properties (offsetX & offsetY) before trying to access them.
ResultEnter.key.no.error.mov |
Some proposals for you here @allroundexperts ! |
Yep. Will be reviewing soon! |
Thanks for your proposal @studentofcoding. However, I'm unable to see how your proposal is different from what @GItGudRatio proposed. |
@bernhardoj Is there any case where we might want to zoom without setting a proper zoom delta? If not, then I think @GItGudRatio's proposal should work well. |
I think no. If we proceed with @GItGudRatio's proposal, does that mean we only allow user to zoom out but not zoom in with keyboard? EDIT: actually, depends on where we put the condition, we might disable both zoom in/out with keyboard. Is that what we expected? |
Just for note: In my proposal the Zoom in and out are also managed with Enter Keyboard @bernhardoj @allroundexperts Also although the RCA is similar, I've detailed the solution & demo of it |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@conorpendergrast, @allroundexperts Still overdue 6 days?! Let's take care of this! |
@conorpendergrast, @allroundexperts Still overdue 6 days?! Let's take care of this! |
📣 @allroundexperts Please request via NewDot manual requests for the Reviewer role ($1000) |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @ayazhussain79 We're missing your Upwork ID to automatically send you an offer for the Reporter role. |
PR is ready cc: @allroundexperts |
🎯 ⚡️ Woah @allroundexperts / @bernhardoj, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
|
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:
|
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:
|
@allroundexperts don't forget about the BZ checklist! ^^ |
@ayazhussain79 can you please apply to the job? https://www.upwork.com/jobs/~012ae65e5538e04b44 Reporter: @ayazhussain79 - $250 |
@bernhardoj you've been paid! 🎉 |
@NicMendonca Thanks |
@NicMendonca Applied on upwork, Thank you |
Reviewer Checklist
Regression Test Steps
Verify that no error occurs in the console upon pressing the Enter key. Do we 👍 or 👎 ? |
@allroundexperts don't forget to request payment via Expensify! @ayazhussain79 you've been paid via Upwork! Payment summary:
|
$1,500 payment approved for @allroundexperts based on BZ summary. |
@NicMendonca Could you kindly end the contract related to this bug on Upwork? |
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:
Pressing the Enter button after zooming in on an image should not trigger any console errors
Actual Result:
Console error "Uncaught TypeError: Cannot read properties of undefined (reading 'offsetX')" occurs when pressing the Enter button after zooming in on an image
Workaround:
Yes - there is no user impact here
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.57-2
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
screen-recording-2023-08-14-at-102510-pm_9ehB6Ht1.mp4
Recording.1509.mp4
Expensify/Expensify Issue URL:
Issue reported by: @ayazhussain79
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692035680346459
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: