[HOLD for payment 2021-11-22] Details page - Show tooltip on user detail page if the email is too long
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:
- Navigate to a conversation with a user that has a long email
- Open the user detail page
- Hover the cursor over the email
Expected Result:
There should be a tooltip to view the email address
Actual Result:
There's no tooltip to view the email address.
Workaround:
Unknown.
Platform:
Where is this issue occurring?
- Web
- Desktop App
Version Number: 1.1.2-5
Reproducible in staging?: yes Reproducible in production?: yes
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @akshayasalvi Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1632614361076100
Triggered auto assignment to @MitchExpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
Solution
In CommunicationsLink.js, we can add Tooltip only to the else block as it is for wide screen width.
Replace the {props.children} in the else (after : ) block with the following code:
<Tooltip text={props.value}>
<View style={[styles.communicationsLinkWidth]}>
{props.children}
</View>
</Tooltip>
and in style.js add the following:
communicationsLinkWidth: {
maxWidth: 320,
}
We need to wrap the props.children around a View so that the view doesn't break when we have a very long email address.
Screenshots:


You are showing a tooltip even if the email is small and clearly visible but the issue title says, show the tooltip when the email is too long and trimmed.
You are showing a tooltip even if the email is small and clearly visible but the issue title says, show the tooltip when the email is too long and trimmed.
I thought about it. But in the main chat screen we're showing tooltips irrespective of the length of the email.

because it shows displayName here.
DisplayName could be any of these => First+last Name, email + phone. In most cases, it would be First+last Name and thus we show login in the tooltip.
But on the details page, it's always email so why duplicate this unless Email is trimmed as you reported in Slack.
Reproduced and agree its valuable. This is n6-hold so not labeling eng just yet
On hold
On hold
On hold
@MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
On hold
On hold
@MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Not overdue
@MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Apologies for the delay here, catching up from SuiteWorld and labeling eng! Seems like a good external candidate to me!
Triggered auto assignment to @sketchydroide (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
I agree, external, and it seems we already have a good suggestion for a solution
Triggered auto assignment to @Christinadobrzyn (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
External didn't auto-assign because of my triage assignment so I unapplied/reapplied