-
- }
>
{/* OverlayTrigger doesn't play nicely with `disabled` buttons, because the :hover events don't fire. This is a workaround to ensure the popover appears see: https://github.com/react-bootstrap/react-bootstrap/issues/1588*/}
-
-
+
);
}
return (
diff --git a/webapp/channels/src/components/analytics/activated_users_card/index.tsx b/webapp/channels/src/components/analytics/activated_users_card/index.tsx
index 8e2f05a78d..e93a57d632 100644
--- a/webapp/channels/src/components/analytics/activated_users_card/index.tsx
+++ b/webapp/channels/src/components/analytics/activated_users_card/index.tsx
@@ -3,7 +3,7 @@
import classNames from 'classnames';
import React from 'react';
-import {FormattedMessage, defineMessages} from 'react-intl';
+import {FormattedMessage} from 'react-intl';
import {AlertOutlineIcon} from '@mattermost/compass-icons/components';
@@ -11,17 +11,15 @@ import StatisticCount from 'components/analytics/statistic_count';
import {calculateOverageUserActivated} from 'utils/overage_team';
+import Title from './title';
+
type ActivatedUserCardProps = {
seatsPurchased: number;
activatedUsers: number | undefined;
isCloud: boolean;
}
-export const messages = defineMessages({
- totalUsers: {id: 'analytics.team.totalUsers', defaultMessage: 'Total Active Users'},
-});
-
-export const ActivatedUserCard = ({activatedUsers, seatsPurchased, isCloud}: ActivatedUserCardProps) => {
+const ActivatedUserCard = ({activatedUsers, seatsPurchased, isCloud}: ActivatedUserCardProps) => {
const {isBetween5PercerntAnd10PercentPurchasedSeats, isOver10PercerntPurchasedSeats} = calculateOverageUserActivated({seatsPurchased, activeUsers: activatedUsers || 0});
const showOverageWarning = !isCloud && (isBetween5PercerntAnd10PercentPurchasedSeats || isOver10PercerntPurchasedSeats);
@@ -36,11 +34,7 @@ export const ActivatedUserCard = ({activatedUsers, seatsPurchased, isCloud}: Act
return (
- }
+ title={}
icon='fa-users'
status={activeUserStatus}
count={activatedUsers}
@@ -67,3 +61,5 @@ export const ActivatedUserCard = ({activatedUsers, seatsPurchased, isCloud}: Act
);
};
+
+export default ActivatedUserCard;
diff --git a/webapp/channels/src/components/analytics/activated_users_card/title.tsx b/webapp/channels/src/components/analytics/activated_users_card/title.tsx
new file mode 100644
index 0000000000..76094d4308
--- /dev/null
+++ b/webapp/channels/src/components/analytics/activated_users_card/title.tsx
@@ -0,0 +1,35 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See LICENSE.txt for license information.
+
+import React from 'react';
+import {defineMessage, defineMessages, useIntl} from 'react-intl';
+
+import {InformationOutlineIcon} from '@mattermost/compass-icons/components';
+
+import ExternalLink from 'components/external_link';
+import WithTooltip from 'components/with_tooltip';
+
+export const messages = defineMessages({
+ totalUsers: {id: 'analytics.team.totalUsers', defaultMessage: 'Total Activated Users'},
+});
+
+const Title = () => {
+ const intl = useIntl();
+ return (
+
+
+
+ {intl.formatMessage(messages.totalUsers)}
+
+
+
+
+ );
+};
+
+export default Title;
diff --git a/webapp/channels/src/components/analytics/system_analytics/system_analytics.tsx b/webapp/channels/src/components/analytics/system_analytics/system_analytics.tsx
index 40305c403f..de6862e13d 100644
--- a/webapp/channels/src/components/analytics/system_analytics/system_analytics.tsx
+++ b/webapp/channels/src/components/analytics/system_analytics/system_analytics.tsx
@@ -9,7 +9,7 @@ import type {ClientLicense} from '@mattermost/types/config';
import * as AdminActions from 'actions/admin_actions.jsx';
-import {ActivatedUserCard} from 'components/analytics/activated_users_card';
+import ActivatedUserCard from 'components/analytics/activated_users_card';
import TrueUpReview from 'components/analytics/true_up_review';
import ExternalLink from 'components/external_link';
import AdminHeader from 'components/widgets/admin_console/admin_header';
diff --git a/webapp/channels/src/components/analytics/team_analytics/team_analytics.tsx b/webapp/channels/src/components/analytics/team_analytics/team_analytics.tsx
index 967e1a127d..634b44e8c5 100644
--- a/webapp/channels/src/components/analytics/team_analytics/team_analytics.tsx
+++ b/webapp/channels/src/components/analytics/team_analytics/team_analytics.tsx
@@ -16,7 +16,8 @@ import {General} from 'mattermost-redux/constants';
import * as AdminActions from 'actions/admin_actions';
import Banner from 'components/admin_console/banner';
-import {ActivatedUserCard, messages as activatedUsersCardsMessages} from 'components/analytics/activated_users_card';
+import ActivatedUserCard from 'components/analytics/activated_users_card';
+import {messages as activatedUsersCardsMessages} from 'components/analytics/activated_users_card/title';
import LineChart from 'components/analytics/line_chart';
import StatisticCount from 'components/analytics/statistic_count';
import TableChart from 'components/analytics/table_chart';
diff --git a/webapp/channels/src/components/overlay_trigger.tsx b/webapp/channels/src/components/overlay_trigger.tsx
index 0c15a9fba7..b6a743536c 100644
--- a/webapp/channels/src/components/overlay_trigger.tsx
+++ b/webapp/channels/src/components/overlay_trigger.tsx
@@ -19,6 +19,9 @@ type Props = OverlayTriggerProps & {
className?: string;
};
+/**
+ * @deprecated Use (and expand when extrictly needed) WithTooltip instead
+ */
const OverlayTrigger = React.forwardRef((props: Props, ref?: React.Ref) => {
const {overlay, disabled, ...otherProps} = props;
diff --git a/webapp/channels/src/components/shortcut_key/shortcut_key.scss b/webapp/channels/src/components/shortcut_key/shortcut_key.scss
index 37ff6a4f20..ae327291b4 100644
--- a/webapp/channels/src/components/shortcut_key/shortcut_key.scss
+++ b/webapp/channels/src/components/shortcut_key/shortcut_key.scss
@@ -42,3 +42,20 @@
}
}
}
+
+.console__body {
+ .shortcut-key {
+ display: inline-block;
+ border-radius: 4px;
+
+ &.shortcut-key--tooltip {
+ padding: 2px 5px;
+ background-color: rgba(255, 255, 255, 0.08);
+ color: rgba(255, 255, 255, 0.72);
+ font-family: inherit;
+ font-size: 12px;
+ font-weight: 600;
+ line-height: 16px;
+ }
+ }
+}
diff --git a/webapp/channels/src/components/tooltip.tsx b/webapp/channels/src/components/tooltip.tsx
index 76d76d1e4e..a013193988 100644
--- a/webapp/channels/src/components/tooltip.tsx
+++ b/webapp/channels/src/components/tooltip.tsx
@@ -14,6 +14,9 @@ type Props = {
placement?: string;
};
+/**
+ * @deprecated Use (and expand when extrictly needed) WithTooltip instead
+ */
export default function Tooltip(props: Props) {
return (
, 'children' | 'id'>) => {
+ const title = getStringOrDescriptorComponent(commonTooltipProps.title);
+ const hint = getStringOrDescriptorComponent(commonTooltipProps.hint);
+
+ const emoji = commonTooltipProps.emoji && (
+
+ );
+ return (
+
+