-
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
[HOLD for payment 2023-10-23] [$500] Share code - App displays message menu on self profile #28591
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.Logging in with deep link of profile page shows message oneself option briefly. What is the root cause of that problem?We show the Lines 234 to 242 in 7c86d09
when the user is not current user and not anonymous. and the isCurrentUser check here is done with props.loginList Line 124 in 7c86d09
So there is a brief period where the loginList is not loaded yet and the session user login is absent from the loginList . Then isCurrentUser is false and the MenuItem with messaging option is shown briefly.
What changes do you think we should make in order to solve the problem?Since we moved to accountIDs I think it is better to do the check of session: {
key: ONYXKEYS.SESSION,
} and change the const isCurrentUser = props.session.accountID === accountID; I see a What alternative solutions did you explore? (Optional)
{!_.isEmpty(props.loginList) && !isCurrentUser && !Session.isAnonymousUser() && ( so that we do not show this ResultScreen.Recording.2023-10-01.at.12.01.23.PM.mov |
Job added to Upwork: https://www.upwork.com/jobs/~018b9b851a1c88f1df |
Triggered auto assignment to @greg-schroeder ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.App sis displaying display message menu on visiting self profile using profile link What is the root cause of that problem?We are not showing loading screen if current user details are not available. Even if current user details is still loading we are rendering the component. Line 257 in 1af1eec
What changes do you think we should make in order to solve the problem?We can add another condition over the above code like this to show the loading screen if currentuserdetails are note available {!hasMinimumDetails && isLoading || !login && <FullScreenLoadingIndicator style={styles.flex1} />} What alternative solutions did you explore? (Optional)We can add the same condition here as well Lines 234 to 243 in 1af1eec
{!isCurrentUser && !Session.isAnonymousUser() &&!login && (
<MenuItem
title={`${props.translate('common.message')}${displayName}`}
titleStyle={styles.flex1}
icon={Expensicons.ChatBubble}
onPress={() => Report.navigateToAndOpenReportWithAccountIDs([accountID])}
wrapperStyle={styles.breakAll}
shouldShowRightIcon
/>
)} Adding the conditions in both the places gives the best result. |
@c3024 Thanks for the proposal. Your RCA makes sense. Regarding the solution is the session onyx value populated first? (before loginList) If so can you please include the timeline when each is populated? Also can you please confirm that we are not "inverting" the bug i.e. try deep link login with an url that points to another user account - in this case the message button should immediately be visible |
@saranshbalyan-1234 Thanks for the proposal. Your RCA makes sense but I don't think the solution follows our offline pattern. If the user is just waiting to read data from the server then we should show whatever data we have in onyx (even if stale) and update it once we get fresh data. We should not block the user. As for the alternative solution, I think you meant to type |
Thanks @s77rt for the review. Here is the timeline of loading session and loginList. Screen.Recording.2023-10-03.at.5.42.36.AM.movIf we login with deep link of another user link, the message option shows right away so it does not invert the bug. anotherUserShareCodeLink.movSince |
@c3024 Thanks for the confirmation. Let's get this fixed. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @pecanoro, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@dukenv0307 I don't see how this is a BE bug. What data is the server not sending correctly? |
@s77rt You can see the image, the data doesn't contain the login though this is the current user. That makes |
@dukenv0307 The data is not supposed to include |
My bad, you are right. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The app displays message menu on self profile What is the root cause of that problem?As I mentioned above, Line 124 in e30dce1
And then the profile is displayed unexpectedly before the full data is loaded Line 157 in e30dce1
What changes do you think we should make in order to solve the problem?
Line 157 in e30dce1
To do this we can use And update the condition here to Line 157 in e30dce1
and here to Line 257 in e30dce1
We can accept that the profile page is loading whenever we reload this page or if we want to only show the loading the first time we can get the login field of the current user and check if it is empty we will not show loading page
What alternative solutions did you explore? (Optional)NA Resultresult-nen.mp4 |
@dukenv0307 Thanks for the proposal. The second highlighted problem is not what was reported here and I don't see it as a blocker, it looks okay that the name and the avatar are shown before other info. Also it does not seem fair to go with your proposal just because it's fixing another bug. If you feel that the bug is something we should fix please report in Slack. |
Screen.Recording.2023-10-04.at.05.38.53.mp4
Line 157 in e30dce1
|
Showing loading every time we reload the profile page is not a good idea. const currentUserLogin = lodashGet(props.personalDetails, `${props.session.accountID}.login`, '');
hasMinimumDetails && (!props.isLoadingApp || currentUserLogin)
(!hasMinimumDetails || (props.isLoadingApp && !currentUserLogin)) && isLoading checking Moreover, complicating existing conditions this much for such a trivial edge case does not make sense to me. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-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-10-20. 🎊 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:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-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-10-20. 🎊 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:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-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 2023-10-23. 🎊 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:
|
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-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 2023-10-23. 🎊 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:
|
Melvin is going crazy with the checklists |
Man what is going on with this issue, lol |
Not overdue, will process payment today |
Payments complete. C+ checklist completed here. closing. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
App should not display message menu on visiting self profile using profile link
Actual Result:
App displays message menu for sometime on login with self profile URL
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.75-8
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
windows.chrome.message.tab.on.self.profile.mp4
ios.chrome.app.displays.message.on.login.with.self.profile.URL.mov
mac.chrome.app.displays.message.on.login.with.self.profile.URL.mov
android.chrome.message.tab.on.self.profile.mp4
Recording.1680.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696098415905769
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: