diff --git a/web/chat/composed-message.react.js b/web/chat/composed-message.react.js --- a/web/chat/composed-message.react.js +++ b/web/chat/composed-message.react.js @@ -14,10 +14,10 @@ import { type ThreadInfo } from 'lib/types/thread-types'; import { type InputState, InputStateContext } from '../input/input-state'; +import { tooltipPositions, useMessageTooltip } from '../utils/tooltip-utils'; import css from './chat-message-list.css'; import FailedSend from './failed-send.react'; import InlineSidebar from './inline-sidebar.react'; -import { tooltipPositions, useMessageTooltip } from './tooltip-utils'; const availableTooltipPositionsForViewerMessage = [ tooltipPositions.LEFT, diff --git a/web/chat/message-tooltip.react.js b/web/chat/message-tooltip.react.js --- a/web/chat/message-tooltip.react.js +++ b/web/chat/message-tooltip.react.js @@ -3,13 +3,13 @@ import classNames from 'classnames'; import * as React from 'react'; +import { type MessageTooltipAction } from '../utils/tooltip-utils'; import { tooltipButtonStyle, tooltipLabelStyle, tooltipStyle, } from './chat-constants'; import css from './message-tooltip.css'; -import { type MessageTooltipAction } from './tooltip-utils'; type MessageTooltipProps = { +actions: $ReadOnlyArray, diff --git a/web/chat/robotext-message.react.js b/web/chat/robotext-message.react.js --- a/web/chat/robotext-message.react.js +++ b/web/chat/robotext-message.react.js @@ -13,9 +13,9 @@ import { linkRules } from '../markdown/rules.react'; import { updateNavInfoActionType } from '../redux/action-types'; import { useSelector } from '../redux/redux-utils'; +import { tooltipPositions, useMessageTooltip } from '../utils/tooltip-utils'; import InlineSidebar from './inline-sidebar.react'; import css from './robotext-message.css'; -import { tooltipPositions, useMessageTooltip } from './tooltip-utils'; const availableTooltipPositionsForRobotext = [ tooltipPositions.LEFT, diff --git a/web/chat/tooltip-provider.js b/web/chat/tooltip-provider.js --- a/web/chat/tooltip-provider.js +++ b/web/chat/tooltip-provider.js @@ -4,7 +4,7 @@ import invariant from 'invariant'; import * as React from 'react'; -import type { TooltipPositionStyle } from './tooltip-utils'; +import type { TooltipPositionStyle } from '../utils/tooltip-utils'; import css from './tooltip.css'; const onMouseLeaveSourceDisappearTimeoutMs = 200; diff --git a/web/chat/tooltip-utils.js b/web/utils/tooltip-utils.js rename from web/chat/tooltip-utils.js rename to web/utils/tooltip-utils.js --- a/web/chat/tooltip-utils.js +++ b/web/utils/tooltip-utils.js @@ -14,6 +14,14 @@ import { threadPermissions } from 'lib/types/thread-types'; import { longAbsoluteDate } from 'lib/utils/date-utils'; +import { + tooltipButtonStyle, + tooltipLabelStyle, + tooltipStyle, +} from '../chat/chat-constants'; +import MessageTooltip from '../chat/message-tooltip.react'; +import type { PositionInfo } from '../chat/position-types'; +import { useTooltipContext } from '../chat/tooltip-provider'; import CommIcon from '../CommIcon.react'; import { InputStateContext } from '../input/input-state'; import { useSelector } from '../redux/redux-utils'; @@ -22,14 +30,6 @@ useOnClickThread, } from '../selectors/nav-selectors'; import { calculateMaxTextWidth } from '../utils/text-utils'; -import { - tooltipButtonStyle, - tooltipLabelStyle, - tooltipStyle, -} from './chat-constants'; -import MessageTooltip from './message-tooltip.react'; -import type { PositionInfo } from './position-types'; -import { useTooltipContext } from './tooltip-provider'; export const tooltipPositions = Object.freeze({ LEFT: 'left', diff --git a/web/utils/tooltip-utils.test.js b/web/utils/tooltip-utils.test.js --- a/web/utils/tooltip-utils.test.js +++ b/web/utils/tooltip-utils.test.js @@ -1,7 +1,7 @@ // @flow import type { PositionInfo } from '../chat/position-types'; -import { findTooltipPosition, tooltipPositions } from '../chat/tooltip-utils'; +import { findTooltipPosition, tooltipPositions } from './tooltip-utils'; const QHDWindow = { width: 2560,