Commit 5604845b authored by Gavin Williams's avatar Gavin Williams Committed by Commit Bot

Add a tooltip for user emails on the Manage People page

-Use a function to prevent tooltips from showing for account names. We
only want tooltips for email addresses.

Bug: 836777
Change-Id: I997843b39b2e662195e8e852bde5408504726b50
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807563Reviewed-by: default avatarBailey Berro <baileyberro@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Gavin Williams <gavinwill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697874}
parent e468a5eb
......@@ -47,8 +47,10 @@
<div class="user layout horizontal center two-line">
<img class="user-icon" src="[[getProfilePictureUrl_(item)]]">
<div class="flex layout vertical user-info no-min-width">
<div class="text-elide">[[getUserName_(item)]]</div>
<div class="secondary text-elide"
<div class="text-elide" title="[[getTooltip_(item)]]">
[[getUserName_(item)]]
</div>
<div class="secondary text-elide" title="[[item.displayEmail]]"
hidden$="[[!shouldShowEmail_(item)]]">
[[item.displayEmail]]
</div>
......
......@@ -123,4 +123,14 @@ Polymer({
shouldShowEmail_: function(user) {
return !user.isSupervised && user.name != user.displayEmail;
},
/**
* Use this function to prevent tooltips from displaying for user names. We
* only want to display tooltips for email addresses.
* @param {chrome.usersPrivate.User} user
* @private
*/
getTooltip_: function(user) {
return !this.shouldShowEmail_(user) ? user.displayEmail : '';
},
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment