-
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 2023-09-29] [$1000] Web - Profile - Profile error is not dismissed even after opening further menus and coming back #25405
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile error is not dismissed even after opening further menus and coming back What is the root cause of that problem?We use App/src/pages/settings/Profile/ProfilePage.js Line 131 in a03a21d
What changes do you think we should make in order to solve the problem?In
What alternative solutions did you explore? (Optional)NA ResultScreen.Recording.2023-08-14.at.11.06.28.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.The app should dismiss the error on the profile page as soon as we navigate to another page What is the root cause of that problem?We are saving the error at state: App/src/components/AvatarWithImagePicker.js Lines 111 to 113 in ed2c287
We are saving an error in the state, That's why when we go to the next page and then back to the previous page will not unmount that's why the state is not clear What changes do you think we should make in order to solve the problem?We should add the logic to clear error when the page is visible again in componentDidUpdate using if (!prevProps.isFocused && this.props.isFocused) {
this.setError(null,{});
} What alternative solutions did you explore? (Optional)N/A |
Triggered auto assignment to @laurenreidexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~014ab616209feb88d9 |
Current assignee @laurenreidexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.[$1000] Web - Profile - Profile error is not dismissed even after opening further menus and coming back #25405 - Expensify What is the root cause of that problem?Because validationError variable is part of state and is not updated automatically during navigating to other pages What changes do you think we should make in order to solve the problem?I feel we should add following changes in code
What alternative solutions did you explore? (Optional)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - Profile - Profile error is not dismissed even after opening further menus and coming back What is the root cause of that problem?We are using the state to save the errors in the App/src/components/AvatarWithImagePicker.js Lines 111 to 113 in ed2c287
What changes do you think we should make in order to solve the problem?Since we are moving towards functional components in the future, we should migrate the component to a functional one in this issue only. useImperativeHandle(ref, () => ({
clearError() {
setError(null, {});
}
})); And use it before Navigation calls like this by using ref Or After refactoring, we can use What alternative solutions did you explore? (Optional) |
@jjcoffee bump for review on these ^^ |
Reviewing now! |
@dukenv0307 proposal LGTM! It has the correct RCA and a good solution, so I'm happy to go with it. @shubham1206agra's suggestion to migrate the component to a functional one is nice, but seems a bit out of scope for this issue. Happy to defer to @neil-marcellini if they disagree! For completeness' sake - @namhihi237 and @lucentdevteam are duplicates of @dukenv0307's proposal. 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@jjcoffee I was only saying to migrate to the functional component, as when we move to a functional component in future, the code using Meanwhile, I don't have any problem if the internal team decides not to migrate right now. |
Please re-state the problem that we are trying to solve in this issue.Profile error is not dismissed even after opening further menus and coming back What is the root cause of that problem?We use Navigation.navigate to open other menus, ProfilePage is already in the stack navigator. when we go to the other menu and come back, What changes do you think we should make in order to solve the problem?In the AvatarWithImagePicker component, expose a method to clear the error directly using a regular class method on the below file:
In our parent component, where we are rendering the
When we want to navigate to a new screen, call the clearError method within MenuItemWithTopDescription component here
change in
Video: |
@neil-marcellini is OOO, finding someoen else to review |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@jjcoffee The PR is ready to review. |
@neil-marcellini In this case I think you'd see that the avatar hasn't updated and so navigating away from the page is a sort of implicit dismissal of the error message. Open to arguments though! |
We're ready to merge this one I believe |
@laurenreidexpensify I think @neil-marcellini is OOO, should we assign another engineer? |
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 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.72-11 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-09-29. 🎊 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:
|
|
@laurenreidexpensify Just noting that the PR was approved with a small change that was addressed within 3WD, then merging was delayed due to the internal engineer being OOO (as well as the merge freeze) so I think the timeliness bonus may be due here. |
@neil-marcellini, @jjcoffee, @laurenreidexpensify, @dukenv0307 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Not overdue, bump @laurenreidexpensify |
@jjcoffee agree - with synopsis, will adjust now |
Payment Summary:
|
@jjcoffee bump on regression steps + final checklist |
@laurenreidexpensify Thanks! Checklist is completed here. |
great thanks, we done! |
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:
App should dismiss error on profile page as soon as we navigate to another page
Actual Result:
App does not dismiss error on profile page even when we navigate to another page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.55-1
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
2575716424650642242error_not_dismissed_profile_page.MP4
Recording.5886.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691319644122389
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: