[HOLD for payment 2021-11-09] LHN - Add a tooltip for profile avatar and online status icon - Reported by: @Santhosh-Sellavel
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel! https://www.upwork.com/jobs/~018dcc91f795eb7919
Action Performed:
- Navgiate to New Expensify
- Hover over the avatar profile icon and the online dot
Expected Result:
There should be a tooltip showing the following:
- For the avatar - The full name of the user
- For the online dot - The online/offline status
Actual Result:
No tooltip is displayed for both.
Workaround:
None needed. Visual issue.
Platform:
Where is this issue occurring?
- Web
- Desktop App
Version Number: 1.1.8-0
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: @Santhosh-Sellavel Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1634333219380400
Triggered auto assignment to @HorusGoul (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Proposal
- We need to localize
online,offline,syncingwords I was thinking to add them on here https://github.com/Expensify/App/blob/d4b934fc96625e3b9c8e24c6a61e3b202ceef5c0/src/languages/en.js#L222
online: 'Online',
offline: 'Offline',
syncing: 'Syncing',
- src/pages/home/sidebar/SidebarLinks.js
Remove this
Tooltipwrapper and pass a proptooltipTexttoAvatarWithIndicatorFrom this: https://github.com/Expensify/App/blob/d4b934fc96625e3b9c8e24c6a61e3b202ceef5c0/src/pages/home/sidebar/SidebarLinks.js#L155-L167 To this:
<TouchableOpacity
accessibilityLabel={this.props.translate('sidebarScreen.buttonMySettings')}
accessibilityRole="button"
onPress={this.props.onAvatarClick}
>
<AvatarWithIndicator
source={this.props.myPersonalDetails.avatar}
isActive={this.props.network && !this.props.network.isOffline}
isSyncing={this.props.network && !this.props.network.isOffline && this.props.isSyncingData}
// ↓↓↓ WE NEED THIS
tooltipText={`${this.props.myPersonalDetails.displayName}`}
/>
</TouchableOpacity>
- src/components/AvatarWithIndicator.js
We need to wrap
AvatarwithTooltip
<Tooltip text={this.props.tooltipText}>
<Avatar
imageStyles={[this.props.size === 'large' ? styles.avatarLarge : null]}
source={this.props.source}
/>
</Tooltip>
And to show user status we need a new function:
/**
* Returns user status as text
* @returns {String}
*/
userStatus() {
if (this.props.isSyncing) {
return this.props.translate('profilePage.syncing');
}
if (this.props.isActive) {
return this.props.translate('profilePage.online');
}
if (!this.props.isActive) {
return this.props.translate('profilePage.offline');
}
}
Finally wrap user status circle with Tooltip
<Tooltip text={this.userStatus()}>
<Animated.View style={StyleSheet.flatten(indicatorStyles)}>
{this.props.isSyncing && (
<Icon
src={Sync}
fill={themeColors.textReversed}
width={6}
height={6}
/>
)}
</Animated.View>
</Tooltip>
Result
https://user-images.githubusercontent.com/11542415/138364668-8be6d7cf-f46b-44f0-9a54-379151ee05f1.mov
Triggered auto assignment to @laurenreidexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
https://www.upwork.com/jobs/~018dcc91f795eb7919
Triggered auto assignment to @mountiny (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@kakajann Thank you for your proposal. It seems like a good solution to me so feel free to apply for the job linked above and let @laurenreidexpensify know here once you do so, so she can hire you there? Thank you very much!
Feel free to start the PR 🙌
One point missing. please use absolute prop on Tooltip and it will be placed correctly.
@parasharrajat Good point from the guy working on that feature 😅
PR is in a review!
Hired in Upwork
Just to clarify -- this GH is not going to add an online/offline status that's shown for other users right in New Expensify, right? It would just show a tooltips for the host account profile avatar + online status.
The reason I ask is because I have another GH assigned to me for adding that online/offline status for other users. So that's why I want to make sure these are unique (https://github.com/Expensify/App/issues/6032).
This tooltip works only on AvatarWithIndicators, so, no it won't work with other users' avatar
Excellent, that's the exact answer I was hoping for - thanks @kakajann 👍 .
PR is almost ready to go, we just need to clarify what needs to be shown as the tooltip over the Avatar as showing Settings would make more sense from accessibility point of view.
PR has been merged 🎉
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.1.12-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/6061
If no regressions arise, payment will be issued on 2021-11-09. :confetti_ball:
Triggered auto assignment to @jliexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
@jliexpensify I'm traveling to States on Tues 9th so won't be online to issue payment. Can you pick up for me?
Payment details for next week: @kakajann $250 for fix @Santhosh-Sellavel $250 bonus for reporting issue
Can do!
Looks like this is the job in Upworks - https://www.upwork.com/ab/applicants/1452575298975145984/job-details. Will be paying @kakajann in that job.
As the job post is now closed, I've sent a new contract to @Santhosh-Sellavel for reporting the bug - please accept so I can pay out the bonus :)