diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_profile.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_profile.test.tsx.snap index ad6a0cc938..e2ef59a76c 100644 --- a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_profile.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_profile.test.tsx.snap @@ -584,6 +584,7 @@ exports[`admin_console/team_channel_settings/team/TeamProfile__Cloud should matc } placement="bottom" trigger={ 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 4d8deebb61..e726c2436f 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 @@ -821,6 +821,7 @@ exports[`components/drafts/panel/panel_body should match snapshot for requested_ } placement="top" trigger={ diff --git a/webapp/channels/src/components/menu/menu.tsx b/webapp/channels/src/components/menu/menu.tsx index 1139c387d2..31b8467cf5 100644 --- a/webapp/channels/src/components/menu/menu.tsx +++ b/webapp/channels/src/components/menu/menu.tsx @@ -22,8 +22,7 @@ import {openModal, closeModal} from 'actions/views/modals'; import {getIsMobileView} from 'selectors/views/browser'; import CompassDesignProvider from 'components/compass_design_provider'; -import OverlayTrigger from 'components/overlay_trigger'; -import Tooltip from 'components/tooltip'; +import WithTooltip from 'components/with_tooltip'; import Constants, {A11yClassNames} from 'utils/constants'; import {isKeyPressed} from 'utils/keyboard'; @@ -31,7 +30,6 @@ import {isKeyPressed} from 'utils/keyboard'; import {MenuContext, useMenuContextValue} from './menu_context'; import {MuiMenuStyled} from './menu_styled'; -const OVERLAY_TIME_DELAY = 500; const MENU_OPEN_ANIMATION_DURATION = 150; const MENU_CLOSE_ANIMATION_DURATION = 100; @@ -203,21 +201,14 @@ export function Menu(props: Props) { if (props.menuButtonTooltip && props.menuButtonTooltip.text && !isMobileView) { return ( - - {props.menuButtonTooltip.text} - - } disabled={isMenuOpen} > {triggerElement} - + ); } diff --git a/webapp/channels/src/components/threading/channel_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap b/webapp/channels/src/components/threading/channel_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap index ae7521ff7b..49d37201a4 100644 --- a/webapp/channels/src/components/threading/channel_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap +++ b/webapp/channels/src/components/threading/channel_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap @@ -97,6 +97,7 @@ exports[`components/threading/channel_threads/thread_footer should report total } placement="top" trigger={ @@ -234,6 +235,7 @@ exports[`components/threading/channel_threads/thread_footer should report total } placement="top" trigger={ @@ -371,6 +373,7 @@ exports[`components/threading/channel_threads/thread_footer should report total } placement="top" trigger={ @@ -482,6 +485,7 @@ exports[`components/threading/channel_threads/thread_footer should report total } placement="top" trigger={ @@ -966,6 +970,7 @@ exports[`components/threading/channel_threads/thread_footer should show unread i } placement="top" trigger={ @@ -1103,6 +1108,7 @@ exports[`components/threading/channel_threads/thread_footer should show unread i } placement="top" trigger={ @@ -1240,6 +1246,7 @@ exports[`components/threading/channel_threads/thread_footer should show unread i } placement="top" trigger={ @@ -1351,6 +1358,7 @@ exports[`components/threading/channel_threads/thread_footer should show unread i } placement="top" trigger={ diff --git a/webapp/channels/src/components/widgets/users/avatars/__snapshots__/avatars.test.tsx.snap b/webapp/channels/src/components/widgets/users/avatars/__snapshots__/avatars.test.tsx.snap index 2e5f5d639a..1cb2cc7aa6 100644 --- a/webapp/channels/src/components/widgets/users/avatars/__snapshots__/avatars.test.tsx.snap +++ b/webapp/channels/src/components/widgets/users/avatars/__snapshots__/avatars.test.tsx.snap @@ -51,6 +51,7 @@ exports[`components/widgets/users/Avatars should fetch missing users 1`] = ` } placement="top" trigger={ @@ -188,6 +189,7 @@ exports[`components/widgets/users/Avatars should fetch missing users 1`] = ` } placement="top" trigger={ @@ -325,6 +327,7 @@ exports[`components/widgets/users/Avatars should fetch missing users 1`] = ` } placement="top" trigger={ @@ -436,6 +439,7 @@ exports[`components/widgets/users/Avatars should fetch missing users 1`] = ` } placement="top" trigger={ @@ -587,6 +591,7 @@ exports[`components/widgets/users/Avatars should properly count overflow 1`] = ` } placement="top" trigger={ @@ -724,6 +729,7 @@ exports[`components/widgets/users/Avatars should properly count overflow 1`] = ` } placement="top" trigger={ @@ -861,6 +867,7 @@ exports[`components/widgets/users/Avatars should properly count overflow 1`] = ` } placement="top" trigger={ @@ -972,6 +979,7 @@ exports[`components/widgets/users/Avatars should properly count overflow 1`] = ` } placement="top" trigger={ @@ -1121,6 +1129,7 @@ exports[`components/widgets/users/Avatars should support userIds 1`] = ` } placement="top" trigger={ @@ -1258,6 +1267,7 @@ exports[`components/widgets/users/Avatars should support userIds 1`] = ` } placement="top" trigger={ @@ -1395,6 +1405,7 @@ exports[`components/widgets/users/Avatars should support userIds 1`] = ` } placement="top" trigger={ diff --git a/webapp/channels/src/components/with_tooltip/index.tsx b/webapp/channels/src/components/with_tooltip/index.tsx index 6fac771a70..2ee215ac6d 100644 --- a/webapp/channels/src/components/with_tooltip/index.tsx +++ b/webapp/channels/src/components/with_tooltip/index.tsx @@ -19,6 +19,7 @@ type WithTooltipProps = { onShow?: () => void; delayHide?: number; onExit?: () => void; + disabled?: boolean; } & CommonTooltipProps; const WithTooltip = ({ id, @@ -33,6 +34,7 @@ const WithTooltip = ({ children, onExit, shouldUpdatePosition, + disabled = false, }: WithTooltipProps) => { const ThisTooltip = useMemo(() => createTooltip({ id, @@ -52,6 +54,7 @@ const WithTooltip = ({ delayHide={delayHide} onExit={onExit} shouldUpdatePosition={shouldUpdatePosition} + disabled={disabled} > {children}