diff --git a/webapp/channels/src/components/advanced_create_post/priority_labels.tsx b/webapp/channels/src/components/advanced_create_post/priority_labels.tsx
index 6ac7025c7d..e5d674a4ac 100644
--- a/webapp/channels/src/components/advanced_create_post/priority_labels.tsx
+++ b/webapp/channels/src/components/advanced_create_post/priority_labels.tsx
@@ -3,18 +3,15 @@
import React, {memo} from 'react';
import type {CSSProperties} from 'react';
-import {FormattedMessage} from 'react-intl';
+import {FormattedMessage, useIntl} from 'react-intl';
import styled from 'styled-components';
import {CheckCircleOutlineIcon, BellRingOutlineIcon} from '@mattermost/compass-icons/components';
import type {PostPriorityMetadata} from '@mattermost/types/posts';
-import OverlayTrigger from 'components/overlay_trigger';
import {HasNoMentions, HasSpecialMentions} from 'components/post_priority/error_messages';
import PriorityLabel from 'components/post_priority/post_priority_label';
-import Tooltip from 'components/tooltip';
-
-import Constants from 'utils/constants';
+import WithTooltip from 'components/with_tooltip';
type Props = {
canRemove: boolean;
@@ -97,6 +94,7 @@ function PriorityLabels({
priority,
requestedAck,
}: Props) {
+ const intl = useIntl();
return (
{priority && (
@@ -106,41 +104,31 @@ function PriorityLabels({
/>
)}
{persistentNotifications && (
-
-
-
- )}
+ title={intl.formatMessage({
+ id: 'post_priority.persistent_notifications.tooltip',
+ defaultMessage: 'Persistent notifications will be sent',
+ })}
>
-
+
)}
{requestedAck && (
-
-
-
- )}
+ title={intl.formatMessage({
+ id: 'post_priority.request_acknowledgement.tooltip',
+ defaultMessage: 'Acknowledgement will be requested',
+ })}
>
-
+
{!(priority) && (
)}
{canRemove && (
-
-
-
- )}
+ title={intl.formatMessage({
+ id: 'post_priority.remove',
+ defaultMessage: 'Remove {priority}',
+ }, {priority})}
>
-
+
)}
);
diff --git a/webapp/channels/src/components/common/comment_icon.tsx b/webapp/channels/src/components/common/comment_icon.tsx
index c2faa8b5b6..1ccc50af37 100644
--- a/webapp/channels/src/components/common/comment_icon.tsx
+++ b/webapp/channels/src/components/common/comment_icon.tsx
@@ -2,11 +2,10 @@
// See LICENSE.txt for license information.
import React from 'react';
-import {FormattedMessage, useIntl} from 'react-intl';
+import {useIntl} from 'react-intl';
-import OverlayTrigger from 'components/overlay_trigger';
-import Tooltip from 'components/tooltip';
import ReplyIcon from 'components/widgets/icons/reply_icon';
+import WithTooltip from 'components/with_tooltip';
import type {Locations} from 'utils/constants';
@@ -42,23 +41,14 @@ const CommentIcon = ({
iconStyle = `${iconStyle} ${searchStyle}`;
}
- const tooltip = (
-
- );
-
return (
-
+
);
};
diff --git a/webapp/channels/src/components/drafts/panel/__snapshots__/panel_body.test.tsx.snap b/webapp/channels/src/components/drafts/panel/__snapshots__/panel_body.test.tsx.snap
index 2ae98f768a..4d8deebb61 100644
--- a/webapp/channels/src/components/drafts/panel/__snapshots__/panel_body.test.tsx.snap
+++ b/webapp/channels/src/components/drafts/panel/__snapshots__/panel_body.test.tsx.snap
@@ -813,79 +813,15 @@ exports[`components/drafts/panel/panel_body should match snapshot for requested_
-
-
-
- }
+
-
-
- }
+ delay={400}
+ overlay={}
placement="top"
trigger={
Array [
@@ -894,34 +830,89 @@ exports[`components/drafts/panel/panel_body should match snapshot for requested_
]
}
>
-
+ }
+ placement="top"
+ trigger={
+ Array [
+ "hover",
+ "focus",
+ ]
+ }
>
-
-
+
+
+
-
+
-
-
- );
-
return (
-
-
+