-
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
[$500] [HOLD for payment 2023-09-06] Dev - Unable to select a state #25998
Comments
Triggered auto assignment to @kevinksullivan ( |
Bug0 Triage Checklist (Main S/O)
|
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @tylerkaraszewski ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.On typing any char for statepicker the modal gets hide What is the root cause of that problem?Seems regression from #25672 where we migrate the App/src/components/Modal/BaseModal.js Lines 84 to 94 in c169952
https://github.com/Expensify/App/pull/25672/files#diff-a766f362da94923822313f0249c8cfaedf93151a08220f529255c40fc67bbf55L54-L63 Reason: Whenever user types in the state textinput, Same can be reproducible for App/src/components/StatePicker/index.js Line 52 in c169952
What changes do you think we should make in order to solve the problem?I think we need to add a new App/src/components/Modal/BaseModal.js Line 95 in c169952
App/src/components/Modal/BaseModal.js Lines 67 to 75 in c029dc5
ResultScreen.Recording.2023-08-27.at.01.27.50.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.Dev - Unable to select a state What is the root cause of that problem?Problem came from the cleanup function of this effect: App/src/components/Modal/BaseModal.js Lines 78 to 94 in c169952
If we take a look at the log, we can see the cleanup function run everytime we type something, the problem is our onClose function is re-created everytime the component re-render. According the react docs:React performs the cleanup when the component unmounts. However, as we learned earlier, effects run for every render and not just once. This is why React also cleans up effects from the previous render before running the effects next time.
What changes do you think we should make in order to solve the problem?Solution 1: useEffect(() => {
return () => {
// Only trigger onClose and setModalVisibility if the modal is unmounting while visible.
if (isVisible) {
hideModal(true);
Modal.willAlertModalBecomeVisible(false);
}
// To prevent closing any modal already unmounted when this modal still remains as visible state
Modal.setCloseModal(null);
};
}, [isVisible]); Solution 2: What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Dev - Unable to select a state What is the root cause of that problem?This might be a regression from this PR #21049. The component hierarchy is in this way If we type anything in the App/src/components/CountryPicker/index.js Line 37 in c169952
After the state update tree render would be like this which means all the state in Which triggers this App/src/components/Modal/BaseModal.js Lines 84 to 93 in c169952
onModalHide .
Kapture.2023-08-27.at.01.03.32.mp4What changes do you think we should make in order to solve the problem?This happens with both
I think we need to move the state here App/src/components/CountryPicker/index.js Line 37 in c169952
App/src/components/StatePicker/index.js Line 41 in c169952
What alternative solutions did you explore? (Optional)NA ResultKapture.2023-08-27.at.01.09.21.mp4 |
Yes, it seems like an regression from #25672. Unless we hear from the author, we can move ahead with solving this issue here. Due to the weekend, it is fine to wait till Monday. |
sorry people for a lot of assignment and unassignments, but because is a deploy blocker and it's causing issues with other PRs that involve pop over behavior, I gonna handle this 🙇 |
Ok, let me know in case my proposal makes sense and if I can do some help here. |
@Pujan92, @kevinksullivan, @allroundexperts, @hayata-suenaga Eep! 4 days overdue now. Issues have feelings too... |
@Pujan92, @kevinksullivan, @allroundexperts, @hayata-suenaga Eep! 4 days overdue now. Issues have feelings too... |
Job added to Upwork: https://www.upwork.com/jobs/~017b84ce7e9fc17d03 |
Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new. |
Current assignee @allroundexperts is eligible for the External assigner, not assigning anyone new. |
Adding label to get upwork job created, not sure why that was skipped before. |
Offers sent to @Pujan92 @Nodebrute and @allroundexperts . Let me know when you accept! |
Accepted @kevinksullivan, Just to confirm this needs to be paid using the earlier payment price, right? |
Can you elaborate on that @Pujan92 ? what is the earlier payment price? |
@kevinksullivan I am referencing this as this issue seems created before 30th aug. |
Payment summary:
|
Is there any speed bonus here @kevinksullivan? |
Checklist
|
Bump of #25998 (comment) @kevinksullivan! |
Sorry @allroundexperts I missed that. Updated payment amounts |
Updated payment to @Pujan92 , just need to pay out @allroundexperts |
@allroundexperts could you accept the offer? |
Asking @JmillsExpensify in DM about the newdot payment. |
$1,500 payment approved for @allroundexperts based on BZ summary. |
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:
The user is able to select a state.
Actual Result:
The user cannot select a state.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number:
Reproducible in staging?: dev
Reproducible in production?: dev
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-26.at.7.07.10.PM.mov
Expensify/Expensify Issue URL:
Issue reported by: @Nodebrute
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693058557198979
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: