-
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
[$250] Email address flickering - Reported by @gadhiyamanan #11134
Comments
Triggered auto assignment to @Christinadobrzyn ( |
ProposalIt happens when you save profile changes and there is no name in the profile this causes display name to be empty We should remove this check as we display the session.email so we don't need to check for displayName App/src/pages/settings/InitialSettingsPage.js Lines 269 to 275 in 50d4295
|
I can't find any other GHs that match this same issue so sending to Eng to see if it should be fixed now. |
Triggered auto assignment to @alex-mechler ( |
@mvtglobally I'm not able to reproduce this, are you? |
@alex-mechler We are not able to repro as well |
@Puneet-here are you able to reproduce? |
Yes, it's reproducible. |
What version(s) are you able to reproduce on? I was unable to reproduce on staging web yesterday (v1.2.3-0) |
(v1.2.3-1)-production cc: @alex-mechler |
I don't see why this is an issue. If a user takes an action on UI and as a result, some part of UI is updated, how can that be an issue? I simply see this as an unrealistic assumption that a user will be playing around with the profile page back and forth as shown in the video. I vote to close it. |
@parasharrajat, check the video below:-
Screen.Recording.2022-09-22.at.4.29.04.PM.mov |
Yeah, that sounds like an issue. OP should be updated to indicate that. |
Ahhh got it. That video with the explict refresh helped me see what was going on here! Thanks for that! Sending this one externally! |
Triggered auto assignment to @stephanieelliott ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Triggered auto assignment to @iwiznia ( |
Proposal: App/src/pages/settings/InitialSettingsPage.js Lines 269 to 276 in 951920b
- {this.props.currentUserPersonalDetails.displayName && (
+ {(!_.isEmpty(this.props.currentUserPersonalDetails.firstName) || !_.isEmpty(this.props.currentUserPersonalDetails.lastName)) && (
<Text
style={[styles.textLabelSupporting, styles.mt1]}
numberOfLines={1}
>
{Str.removeSMSDomain(this.props.session.email)}
</Text>
)} |
IMO it's useful. When the email is longer it will be in ellipsis at the upper row but in the second row the text is small so it is fully visible. Also It was like this from the starting. |
Proposal: Previous proposals don't explain the correct root cause. It's ideal to fix in backend by sending correct
Solution 1: <Pressable style={[styles.mt1, styles.mw100]} onPress={this.openProfileSettings}>
<Text style={[styles.displayName]} numberOfLines={1}>
{this.props.currentUserPersonalDetails.displayName
? this.props.currentUserPersonalDetails.displayName
- : Str.removeSMSDomain(this.props.session.email)}
+ : Str.removeSMSDomain(this.props.currentUserPersonalDetails.login)}
</Text>
</Pressable>
- {this.props.currentUserPersonalDetails.displayName && (
<Text
style={[styles.textLabelSupporting, styles.mt1]}
numberOfLines={1}
>
- {Str.removeSMSDomain(this.props.session.email)}
+ {Str.removeSMSDomain(this.props.currentUserPersonalDetails.login)}
</Text>
- )} Solution 2: <Pressable style={[styles.mt1, styles.mw100]} onPress={this.openProfileSettings}>
<Text style={[styles.displayName]} numberOfLines={1}>
{this.props.currentUserPersonalDetails.displayName
? this.props.currentUserPersonalDetails.displayName
- : Str.removeSMSDomain(this.props.session.email)}
+ : Str.removeSMSDomain(this.props.currentUserPersonalDetails.login)}
</Text>
</Pressable>
- {this.props.currentUserPersonalDetails.displayName && (
+ {this.props.currentUserPersonalDetails.displayName && (this.props.currentUserPersonalDetails.displayName !== this.props.currentUserPersonalDetails.login) && (
<Text
style={[styles.textLabelSupporting, styles.mt1]}
numberOfLines={1}
>
- {Str.removeSMSDomain(this.props.session.email)}
+ {Str.removeSMSDomain(this.props.currentUserPersonalDetails.login)}
</Text>
)} NOTE: |
If that is the case, then removing the condition will be the best thing to do. But I doubt that longer email will be fully visible in smaller text as it will hold only 12-14 characters more than the display name section. |
@aimane-chnaif |
Splendid, @aimane-chnaif you saved me debugging time. I agree, it feels like an issue from the backend. Showing the email two times is completely fine. In fact, we fall back to email when no other option applies. But it will not only email, it can be a phone number too. That's why displayName is used. So solution 2 is not needed. Solution 1 is already being handled on the front end. But the backend is replacing that value which means it is an issue from the backend. @iwiznia What do you think? As #10891 is also caused by the same reason. I vote to close the other one. 🎀 👀 🎀 C+ reviewed |
If this is a backend error, then we should fix it in the backend. But I am not sure exactly what the error is. Specifically, after calling which API command are we receiving the wrong |
Based on #10891 (comment), it seems like the API is |
Ah ok thanks! Was not completely sure. |
ok I think I got a fix, but it's in the backend. |
Removing |
@iwiznia, @parasharrajat, @stephanieelliott Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
We can close this since it's a dupe of #10891, right? |
I don't know why this was not auto closed when this was deployed https://github.com/Expensify/Web-Expensify/pull/34940 |
@iwiznia am i eligible for reporting? |
I think no, since the other issue was reported earlier. |
@iwiznia i think the other issue is different |
I don't think it is. Can you reproduce it? |
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:
email address shows for a second and after that it's not visible
Actual Result:
email address should not show
Workaround:
unknown
Platform:
Where is this issue occurring?
Version Number:
Reproducible in staging?: need repro
Reproducible in production?: need repro
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.2022-09-16.at.11.49.49.AM.mov
Screen_Recording_20220916_100434_New.Expensify.mp4
Simulator.Screen.Recording.-.iPhone.13.mini.-.2022-08-26.at.13.34.36.1.mp4
Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1661501281504419
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: