Remove tooltip from gr-account-label
In favor of the new account hovercard.
Change-Id: Ie90c99a03460ac2c8c7a32fe3d289f3f28d875d9
diff --git a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js
index 83d2ae5..5675f0b 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js
+++ b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js
@@ -32,12 +32,10 @@
/**
* @appliesMixin Gerrit.DisplayNameMixin
- * @appliesMixin Gerrit.TooltipMixin
* @extends Polymer.Element
*/
class GrAccountLabel extends mixinBehaviors( [
Gerrit.DisplayNameBehavior,
- Gerrit.TooltipBehavior,
], GestureEventListeners(
LegacyElementMixin(
PolymerElement))) {
@@ -51,17 +49,7 @@
* @type {{ name: string, status: string }}
*/
account: Object,
- title: {
- type: String,
- reflectToAttribute: true,
- computed: '_computeAccountTitle(account, additionalText)',
- },
voteableText: String,
- hasTooltip: {
- type: Boolean,
- reflectToAttribute: true,
- computed: '_computeHasTooltip(account)',
- },
hideAvatar: {
type: Boolean,
value: false,
@@ -76,7 +64,6 @@
/** @override */
ready() {
super.ready();
- if (!this.additionalText) { this.additionalText = ''; }
this.$.restAPI.getConfig()
.then(config => { this._serverConfig = config; });
}
@@ -84,41 +71,6 @@
_computeName(account, config) {
return this.getUserName(config, account, /* enableEmail */ true);
}
-
- _computeAccountTitle(account, tooltip) {
- // Polymer 2: check for undefined
- if ([
- account,
- tooltip,
- ].some(arg => arg === undefined)) {
- return undefined;
- }
-
- if (!account) { return; }
- let result = '';
- if (this._computeName(account, this._serverConfig)) {
- result += this._computeName(account, this._serverConfig);
- }
- if (account.email) {
- result += ` <${account.email}>`;
- }
- if (this.additionalText) {
- result += ` ${this.additionalText}`;
- }
-
- // Show status in the label tooltip instead of
- // in a separate tooltip on status
- if (account.status) {
- result += ` (${account.status})`;
- }
-
- return result;
- }
-
- _computeHasTooltip(account) {
- // If an account has loaded to fire this method, then set to true.
- return false;
- }
}
customElements.define(GrAccountLabel.is, GrAccountLabel);