-
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
[$500] Android - Status - On tapping save, "clear status" is not shown before navigating to previous page #34886
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01378cdeab58829dc2 |
Triggered auto assignment to @anmurali ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Android - Status - On tapping save, "clear status" is not shown before navigating to previous page What is the root cause of that problem?We show the clear status when there is status emoji or text App/src/pages/settings/Profile/CustomStatus/StatusPage.js Lines 182 to 183 in 52adf77
whose value depends on the status read from the currentUserPersonalDetails so the inconsistency of the display is caused by the difference on whether the onyx update comes before the navigation animation ends or not
What changes do you think we should make in order to solve the problem?To make it consistent we can use a ref (on save button press) that will be set when we set status emoji or text from both empty to some non-empty value and we should not allow the display of the button when that ref is set so that the button consistently will not be displayed while the user is navigated away after pressing the save button. What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.The "Clear status" button is shown for a moment before navigating to a previous screen. What is the root cause of that problem?The button is shown based on this condition: App/src/pages/settings/Profile/CustomStatus/StatusPage.js Lines 182 to 191 in 5e71037
And the status is persisted & navigation happens here: App/src/pages/settings/Profile/CustomStatus/StatusPage.js Lines 83 to 92 in 5e71037
So between the status is persisted and navigation, which happens after interactions, the button is displayed briefly. What changes do you think we should make in order to solve the problem?I don't see a need for using the User.updateCustomStatus({
text: statusText,
emojiCode,
clearAfter: clearAfterTime !== CONST.CUSTOM_STATUS_TYPES.NEVER ? clearAfterTime : '',
});
User.clearDraftCustomStatus();
navigateBackToPreviousScreen(); This way, we will not wait for interactions (i.e. until the status is persisted and the draft status is removed), navigate back, and let the updates happen asynchronously. What alternative solutions did you explore? (Optional) |
📣 @sabal9991! 📣
|
Solution Proposal for GitHub Issue #34886 Issue Title: Clear Status Button Not Showing on Android Description: Steps to Reproduce: Navigate to the status page. Actual Behavior: Potential Causes and Checks: Condition Check: Ensure that the condition !!currentUserEmojiCode || !!currentUserStatusText is evaluating to true. Add console.log statements to inspect the values of currentUserEmojiCode and currentUserStatusText. Check if User.clearDraftCustomStatus() and User.updateDraftCustomStatus({clearAfter: DateUtils.getEndOfToday()}) behave as expected. Verify the dependencies of the useEffect hook for handling draft status. Ensure external components, like the EmojiPicker, are not causing unexpected side effects. Confirm that the styling of the "Clear Status" button is not causing it to be hidden or overlapped. Double-check the navigation flow to ensure it doesn't interfere with the button's visibility. Condition Check: Review the condition !!currentUserEmojiCode || !!currentUserStatusText and make adjustments if necessary. Ensure it accurately reflects the desired visibility criteria. Implement additional logging statements to capture the values of currentUserEmojiCode and currentUserStatusText during the button rendering process. This will help diagnose whether the condition is met. Ensure that the calls to User.clearDraftCustomStatus() and User.updateDraftCustomStatus({clearAfter: DateUtils.getEndOfToday()}) are correctly updating the draft status. Validate the dependencies in the useEffect hook related to handling draft status. Ensure it triggers appropriately based on changes in currentUserEmojiCode and currentUserClearAfter. Examine external components (e.g., EmojiPicker) for any unexpected interactions that might impact the rendering of the "Clear Status" button. Check the styling of the "Clear Status" button to ensure it is not set to be hidden or overlapped by other elements. Review the navigation flow to ensure that navigating back to the profile page is not causing unintended re-renders or state changes. Contributor Guidelines: Payment Terms: I look forward to your feedback and the opportunity to contribute to the resolution of this issue. |
|
1 similar comment
|
Contributor details |
|
Tested on iOS native and Android native and the behavior is consistent. Cannot reproduce. |
@anmurali this is the Web platform that has a faulty behavior: the "Clear status" button appears before the right-hand modal fully closes. It should appear only on the second opening of the modal after the status is set. Screen.Recording.2024-01-25.at.08.21.31.mov |
Issue is reproducible on build 1.4.33.1 34780.Web.mp4 |
@anmurali this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@anmurali Huh... This is 4 days overdue. Who can take care of this? |
Discussed here |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.29.0
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
When tapping save, there must be consistent behaviour on showing/not showing "clear status" in mweb & Android before navigating to previous page.
Actual Result:
After selecting status emoji, entering message, on tapping save "clear status " is seen before navigating to previous page in mweb but not in Android. Inconsistent behaviour is shown.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6350163_1705922791419.g.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: