-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2024-11-07] [$250] Exit survey response auto-validates without any user action. #50962
Comments
Triggered auto assignment to @bfitzexpensify ( |
Edited by proposal-police: This proposal was edited at 2024-10-16 21:57:00 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Exit survey response auto-validates on blur even though the input is empty What is the root cause of that problem?the form auto validates because of the
What changes do you think we should make in order to solve the problem?we should disable it optionally we can remove the What alternative solutions did you explore? (Optional) |
@bfitzexpensify I’ve reported this issue and have more context on it, so I can assist with reviewing the proposal as a C+. |
@suneox Can you reproduce the issue in MacOS: Chrome / Safari? |
This issue can only be reproduced on MacOS/Safari, iOS/Safari and does not occur on MacOS/Chrome, Android/Chrome Screen.Recording.2024-10-17.at.01.01.50.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.The exit survey input field shows validation error when open the page. What is the root cause of that problem?On the page, we have a text input and a ref which calls App/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx Lines 123 to 131 in 780e09e
In App/src/libs/updateMultilineInputRange/index.ts Lines 17 to 24 in 780e09e
On safari, setting the selection will focus on the input. There is a comment about that but was removed here. Because we focus the input too early, the input gets blurred which I think is already a known issue which is why we delay an input focus. This is similar to iOS. App/src/libs/updateMultilineInputRange/index.ios.ts Lines 22 to 24 in 780e09e
So, this issue happens on iOS native too. Note that the
What changes do you think we should make in order to solve the problem?As mentioned before,
For step 2 & 3, we can optionally create a platform-specific file for that to make it cleaner. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Upon navigating to the survey response page, the form validates automatically without any user action. What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
App/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx Lines 127 to 129 in 780e09e
then add:
to this. What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~021846936289595366564 |
Current assignee @suneox is eligible for the External assigner, not assigning anyone new. |
Cool, assigned you @suneox |
The error seems to come from how the form validation is configured. Instead of running the validation when the screen opens, we should trigger it only when the "Next" button is clicked. One way to fix this is by using a form validation library like Zod or Yup, and tying the validation logic to the button's onPress event. This way, the validation will only run when the user interacts with the form. Another option is to manage the error state manually, where we keep error messages in the component’s state and trigger validation only on button click. We could also consider moving all the error handling logic into a separate file to keep the code cleaner and more manageable. |
📣 @fasileds! 📣
|
and if it is only for specific device tell me the device names and i will shear you my thoughts 10Q |
@fasileds Welcome to Expensify! First, please take some time to read through the guidelines on how to contribute to this project. This will help you understand the process and expectations for contributing effectively. |
@bernhardoj proposal to separate the logic for setting the selection range and setting the scroll to the bottom immediately, while keeping the current implementation LGTM. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
If we apply the selected solution, the text input scroll to bottom will only happen on focus. after.mp4This is how it behaves currently. curr.mp4I mentioned this in my proposal too
|
I don’t think it’s a big issue since this behavior currently happens in other areas as well, like in the task description. ScreenRecording_10-19-2024.01-18-06_1_2.mp4 |
It happens in task description because it uses a markdown text input, which doesn't have App/src/libs/updateMultilineInputRange/index.ts Lines 17 to 24 in 66cf824
We scroll immediately to the bottom to solve this issue. If we are fine to change it back, then I think we can just remove Or we can just take |
@bernhardoj Thanks for pointing out the implementation history. Since we already have issue coverage for the case of setting scrollTop immediately so we can proceed with your solution. |
I have updated the selected proposal cc: @neil-marcellini |
Ok, I'm good with @bernhardoj's proposal too |
📣 @suneox 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
PR is ready cc: @suneox |
Issue not reproducible during KI retests. (First week) |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.55-10 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 2024-11-07. 🎊 For reference, here are some details about the assignees on this issue:
|
@suneox @bfitzexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
|
Payment summary: @suneox to be paid $250 for C+ work - paid via Upwork ✅ |
Requested in ND. |
$250 approved for @bernhardoj |
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.49-0
Reproducible in staging?: yes
Reproducible in production?: yes
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: @suneox
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1729102027380939
Action Performed:
Expected Result:
On the survey response page, errors should not be shown until the user clicks “Next” or focuses out of the survey response input.
Actual Result:
Upon navigating to the survey response page, the form validates automatically without any user action.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/106a82ee-3f8e-4ab9-9de5-0f64ead0e383
Screen.Recording.2024-10-17.at.00.53.18.mp4
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @bfitzexpensifyThe text was updated successfully, but these errors were encountered: