+
Overlay
)}
@@ -123,6 +125,7 @@ describe('useHoverOverlay timing', () => {
expect(screen.getByRole('tooltip')).toBeInTheDocument();
unhover(a);
+ advance(CLOSE_DELAY);
expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
advance(SKIP_DELAY_WINDOW - 1);
@@ -146,6 +149,9 @@ describe('useHoverOverlay timing', () => {
advance(OPEN_DELAY);
unhover(a);
+ advance(CLOSE_DELAY);
+ expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
+
advance(SKIP_DELAY_WINDOW + 1);
hover(b);
@@ -175,8 +181,8 @@ describe('useHoverOverlay timing', () => {
expect(screen.getByRole('tooltip')).toBeInTheDocument();
});
- it('holds a hoverable overlay open for CLOSE_DELAY after unhover', () => {
- renderInGroup(
);
+ it('holds an overlay open for CLOSE_DELAY after trigger unhover', () => {
+ renderInGroup(
);
const a = screen.getByRole('button', {name: 'a'});
hover(a);
@@ -191,8 +197,8 @@ describe('useHoverOverlay timing', () => {
expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
});
- it('re-entering during the cooling window keeps the tooltip open', () => {
- renderInGroup(
);
+ it('moving from the trigger to the overlay keeps it open', () => {
+ renderInGroup(
);
const a = screen.getByRole('button', {name: 'a'});
hover(a);
@@ -200,11 +206,15 @@ describe('useHoverOverlay timing', () => {
unhover(a);
advance(CLOSE_DELAY - 10);
- expect(screen.getByRole('tooltip')).toBeInTheDocument();
+ const tooltip = screen.getByRole('tooltip');
- hover(a);
+ fireEvent.mouseEnter(tooltip);
advance(CLOSE_DELAY);
expect(screen.getByRole('tooltip')).toBeInTheDocument();
+
+ fireEvent.mouseLeave(tooltip);
+ advance(CLOSE_DELAY);
+ expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
});
it('reset() while open starts the group cooldown so neighbors open instantly', () => {
@@ -253,7 +263,7 @@ describe('useHoverOverlay timing', () => {
expect(screen.getByRole('tooltip')).toBeInTheDocument();
});
- it('snap-closes a non-hoverable sibling when a neighbor opens via warm-skip', () => {
+ it('snap-closes a sibling that is still in its cooling window', () => {
renderInGroup(
@@ -263,35 +273,10 @@ describe('useHoverOverlay timing', () => {
const a = screen.getByRole('button', {name: 'a'});
const b = screen.getByRole('button', {name: 'b'});
- hover(a);
- advance(OPEN_DELAY);
- expect(screen.getByRole('tooltip', {name: 'a'})).toBeInTheDocument();
-
- // A goes idle (non-hoverable closes instantly). The consumer still has
- // AnimatePresence exit animating — snapClosed is the signal to unmount it.
- unhover(a);
- expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
-
- // Within the warm window, hovering B should fire the snap signal on A.
- hover(b);
- expect(screen.queryByRole('tooltip', {name: 'a'})).not.toBeInTheDocument();
- expect(screen.getByRole('tooltip', {name: 'b'})).toBeInTheDocument();
- });
-
- it('snap-closes a hoverable sibling that is still in its cooling window', () => {
- renderInGroup(
-
-
-
-
- );
- const a = screen.getByRole('button', {name: 'a'});
- const b = screen.getByRole('button', {name: 'b'});
-
hover(a);
advance(OPEN_DELAY);
- // A is hoverable — unhover puts it in cooling, not idle.
+ // Unhover puts A in cooling, not idle.
unhover(a);
expect(screen.getByRole('tooltip', {name: 'a'})).toBeInTheDocument();
@@ -304,7 +289,7 @@ describe('useHoverOverlay timing', () => {
it("does not let a snap-closed cooling overlay's hide timer cool the group", () => {
renderInGroup(
-
+
diff --git a/static/app/utils/useHoverOverlay.tsx b/static/app/utils/useHoverOverlay.tsx
index 8891dacbe229..dc1640860aec 100644
--- a/static/app/utils/useHoverOverlay.tsx
+++ b/static/app/utils/useHoverOverlay.tsx
@@ -72,7 +72,7 @@ function makeDefaultPopperModifiers(arrowElement: HTMLElement | null, offset: nu
const OPEN_DELAY = 400;
/**
- * How long to wait before closing the overlay when isHoverable or
+ * How long to wait before closing the overlay when
* displayTimeout is set.
*/
const CLOSE_DELAY = 150;
@@ -175,8 +175,8 @@ interface UseHoverOverlayProps {
*/
delay?: number;
/**
- * Time in ms until overlay is hidden. When used with isHoverable this is
- * used as the time allowed for the user to move their cursor into the overlay)
+ * Time in ms until the overlay is hidden. This is the time allowed for the
+ * user to move their cursor into the overlay.
*/
displayTimeout?: number;
/**
@@ -184,11 +184,6 @@ interface UseHoverOverlayProps {
* immediately, while `delayed` uses the normal open delay.
*/
forceVisible?: boolean | 'delayed';
- /**
- * If true, user is able to hover overlay without it disappearing. (nice if
- * you want the overlay to be interactive)
- */
- isHoverable?: boolean;
/**
* Offset along the main axis.
*/
@@ -290,7 +285,6 @@ function useHoverOverlay({
style,
delay,
displayTimeout,
- isHoverable,
showUnderline,
underlineColor,
showOnlyOnOverflow,
@@ -520,23 +514,12 @@ function useHoverOverlay({
return;
}
- // Note: the NODE_ENV === 'test' bypass is intentionally only applied on
- // the open path. Tests that want to verify close-delay behavior (the
- // `cooling` grace window) can do so by asserting isOpen mid-timeout,
- // which requires the timer to actually run.
- const hasCloseDelay = isHoverable || displayTimeout !== undefined;
- if (!hasCloseDelay) {
- commitStatus('idle');
- startGroupCoolDown(group);
- return;
- }
-
commitStatus('cooling');
hideTimerRef.current = window.setTimeout(() => {
commitStatus('idle');
startGroupCoolDown(group);
}, displayTimeout ?? CLOSE_DELAY);
- }, [isHoverable, displayTimeout, commitStatus, group]);
+ }, [displayTimeout, commitStatus, group]);
const previousForceVisibleRef = useRef(undefined);
useEffect(() => {
@@ -667,14 +650,13 @@ function useHoverOverlay({
id: describeById,
ref: setOverlayElement,
style: styles.popper,
- onMouseEnter: isHoverable ? handleMouseEnter : undefined,
- onMouseLeave: isHoverable ? handleMouseLeave : undefined,
+ onMouseEnter: handleMouseEnter,
+ onMouseLeave: handleMouseLeave,
};
}, [
describeById,
setOverlayElement,
styles.popper,
- isHoverable,
handleMouseEnter,
handleMouseLeave,
]);
diff --git a/static/app/views/automations/components/disabledAlert.tsx b/static/app/views/automations/components/disabledAlert.tsx
index f75380e576a0..ce50f91c3cd7 100644
--- a/static/app/views/automations/components/disabledAlert.tsx
+++ b/static/app/views/automations/components/disabledAlert.tsx
@@ -44,11 +44,7 @@ export function DisabledAlert({automation}: DisabledAlertProps) {
+
}
diff --git a/static/app/views/automations/components/editAutomationActions.tsx b/static/app/views/automations/components/editAutomationActions.tsx
index aeb30f24541b..cece338642c6 100644
--- a/static/app/views/automations/components/editAutomationActions.tsx
+++ b/static/app/views/automations/components/editAutomationActions.tsx
@@ -74,7 +74,7 @@ export function EditAutomationActions({automation, form}: EditAutomationActionsP
size="sm"
onClick={toggleDisabled}
disabled={!canEdit || isUpdating}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{automation.enabled ? t('Disable') : t('Enable')}
@@ -82,7 +82,7 @@ export function EditAutomationActions({automation, form}: EditAutomationActionsP
variant="danger"
onClick={handleDelete}
disabled={!canEdit || isDeleting}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
size="sm"
>
{t('Delete')}
@@ -103,7 +103,7 @@ export function EditAutomationActions({automation, form}: EditAutomationActionsP
size="sm"
busy={form.isSaving}
disabled={!canEdit}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{t('Save')}
diff --git a/static/app/views/automations/detail.tsx b/static/app/views/automations/detail.tsx
index 6b42d96272b5..0161cea0d2f2 100644
--- a/static/app/views/automations/detail.tsx
+++ b/static/app/views/automations/detail.tsx
@@ -280,14 +280,14 @@ function Actions({automation, size}: {automation: Automation; size?: 'sm'}) {
onClick={toggleDisabled}
busy={isUpdating}
disabled={!canEdit}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{automation.enabled ? t('Disable') : t('Enable')}
}
size={size}
diff --git a/static/app/views/automations/list.tsx b/static/app/views/automations/list.tsx
index 64400b343807..61aad7938ac8 100644
--- a/static/app/views/automations/list.tsx
+++ b/static/app/views/automations/list.tsx
@@ -142,7 +142,6 @@ function TableHeader() {
disabled={!canCreateAlert}
tooltipProps={{
title: canCreateAlert ? undefined : getNoAlertWritePermissionTooltip(),
- isHoverable: true,
}}
variant="primary"
icon={}
diff --git a/static/app/views/dashboards/controls.tsx b/static/app/views/dashboards/controls.tsx
index 316dc77490d2..6c43f028d2e8 100644
--- a/static/app/views/dashboards/controls.tsx
+++ b/static/app/views/dashboards/controls.tsx
@@ -131,7 +131,7 @@ export function DashboardActionBar({
variant="primary"
data-test-id="dashboard-commit"
disabled={hasReachedDashboardLimit || isLoading}
- tooltipProps={{isHoverable: true, title: limitMessage}}
+ tooltipProps={{title: limitMessage}}
>
{t('Save and Finish')}
diff --git a/static/app/views/dashboards/editAccessSelector.tsx b/static/app/views/dashboards/editAccessSelector.tsx
index e04fe4eeba69..203e8b5af8f4 100644
--- a/static/app/views/dashboards/editAccessSelector.tsx
+++ b/static/app/views/dashboards/editAccessSelector.tsx
@@ -163,7 +163,6 @@ export function EditAccessSelector({
return (
}
disabled={hasReachedDashboardLimit || isLoadingDashboardsLimit}
tooltipProps={{
- isHoverable: true,
title: limitMessage,
}}
>
diff --git a/static/app/views/dashboards/widgetBuilder/components/common/sectionHeader.tsx b/static/app/views/dashboards/widgetBuilder/components/common/sectionHeader.tsx
index c9de030072db..1681b5e3d2ab 100644
--- a/static/app/views/dashboards/widgetBuilder/components/common/sectionHeader.tsx
+++ b/static/app/views/dashboards/widgetBuilder/components/common/sectionHeader.tsx
@@ -25,7 +25,6 @@ export function SectionHeader({
disabled={!tooltipText}
position="right-end"
delay={200}
- isHoverable
showUnderline
>
{title}
diff --git a/static/app/views/dashboards/widgetBuilder/components/widgetOnDemandQueryWarning.tsx b/static/app/views/dashboards/widgetBuilder/components/widgetOnDemandQueryWarning.tsx
index 893b64ec5c9e..42e8be12c316 100644
--- a/static/app/views/dashboards/widgetBuilder/components/widgetOnDemandQueryWarning.tsx
+++ b/static/app/views/dashboards/widgetBuilder/components/widgetOnDemandQueryWarning.tsx
@@ -58,15 +58,13 @@ export function WidgetOnDemandQueryWarning(props: {
export function OnDemandWarningIcon({
msg,
- isHoverable,
variant = 'muted',
}: {
msg: React.ReactNode;
- isHoverable?: boolean;
variant?: 'primary' | 'warning' | 'danger' | 'muted';
}) {
return (
-
+
);
diff --git a/static/app/views/dashboards/widgetCard/widgetFrame.tsx b/static/app/views/dashboards/widgetCard/widgetFrame.tsx
index b747a2865b0a..fe770ed561f8 100644
--- a/static/app/views/dashboards/widgetCard/widgetFrame.tsx
+++ b/static/app/views/dashboards/widgetCard/widgetFrame.tsx
@@ -65,7 +65,7 @@ export function WidgetFrame(props: WidgetFrameProps) {
Title={
{props.warnings && props.warnings.length > 0 && (
- } isHoverable>
+ }>
@@ -207,9 +207,5 @@ function TitleActionsWrapper({disabled, disabledMessage, children}: TitleActions
return children;
}
- return (
-
- {children}
-
- );
+ return {children};
}
diff --git a/static/app/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization.tsx b/static/app/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization.tsx
index 1a9117a943dd..3352172a18dc 100644
--- a/static/app/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization.tsx
+++ b/static/app/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization.tsx
@@ -125,7 +125,6 @@ function BigNumberWidgetVisualizationInner(props: BigNumberWidgetVisualizationPr
}
containerDisplayMode="grid"
- isHoverable
forceVisible={props.revealTooltip === 'always' ? true : undefined}
>
+
}
onClick={openCreateDrawer}
disabled={!canEditWorkflowConnections}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{t('New Alert')}
@@ -241,7 +241,7 @@ export function DetectorDetailsAutomations({detector}: Props) {
size="xs"
onClick={toggleDrawer}
disabled={!canEditWorkflowConnections}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
icon={}
>
{t('Edit Alerts')}
@@ -259,7 +259,7 @@ export function DetectorDetailsAutomations({detector}: Props) {
size="sm"
onClick={toggleDrawer}
disabled={!canEditWorkflowConnections}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{t('Connect Existing Alerts')}
@@ -268,7 +268,7 @@ export function DetectorDetailsAutomations({detector}: Props) {
icon={}
onClick={openCreateDrawer}
disabled={!canEditWorkflowConnections}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{t('Create a New Alert')}
diff --git a/static/app/views/detectors/components/forms/automateSection.tsx b/static/app/views/detectors/components/forms/automateSection.tsx
index 0775cc973650..50c560022af1 100644
--- a/static/app/views/detectors/components/forms/automateSection.tsx
+++ b/static/app/views/detectors/components/forms/automateSection.tsx
@@ -153,7 +153,7 @@ function AutomateSectionInner({
icon={}
onClick={openCreateDrawer}
disabled={!canEditAutomation}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{t('Create New Alert')}
@@ -162,7 +162,7 @@ function AutomateSectionInner({
icon={}
onClick={toggleDrawer}
disabled={!canEditAutomation}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{t('Edit Alerts')}
@@ -191,7 +191,7 @@ function AutomateSectionInner({
style={{width: 'min-content'}}
onClick={toggleDrawer}
disabled={!canEditAutomation}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{t('Connect Existing Alerts')}
@@ -199,7 +199,7 @@ function AutomateSectionInner({
size="sm"
onClick={openCreateDrawer}
disabled={!canEditAutomation}
- tooltipProps={{title: permissionTooltipText, isHoverable: true}}
+ tooltipProps={{title: permissionTooltipText}}
>
{t('Create New Alert')}
diff --git a/static/app/views/detectors/components/forms/metric/metric.tsx b/static/app/views/detectors/components/forms/metric/metric.tsx
index 057cd2419e5d..1bb30f43b6b8 100644
--- a/static/app/views/detectors/components/forms/metric/metric.tsx
+++ b/static/app/views/detectors/components/forms/metric/metric.tsx
@@ -474,7 +474,6 @@ function CustomizeMetricSection({step}: {step?: number}) {
/>
@@ -485,7 +484,6 @@ function CustomizeMetricSection({step}: {step?: number}) {
@@ -496,7 +494,6 @@ function CustomizeMetricSection({step}: {step?: number}) {
dataset === DetectorDataset.METRICS ? null : (
@@ -540,7 +537,6 @@ function DetectSection({step}: {step?: number}) {
tct(
'The amount of time between each uptime check request. Selecting a period of [interval] means it will take at least [expectedFailureInterval] until you are notified of a failure. [link:Learn more].',
@@ -145,7 +145,7 @@ export function UptimeDetectorFormDetectSection({step}: {step?: number}) {
-
+
diff --git a/static/app/views/detectors/components/uptime/uptimeAlertForm.tsx b/static/app/views/detectors/components/uptime/uptimeAlertForm.tsx
index 734caabf2ac8..08363c3219cc 100644
--- a/static/app/views/detectors/components/uptime/uptimeAlertForm.tsx
+++ b/static/app/views/detectors/components/uptime/uptimeAlertForm.tsx
@@ -342,7 +342,7 @@ function UptimeAlertFormContent({handleDelete, rule}: Props) {
label={t('Interval')}
defaultValue={60}
flexibleControlStateSize
- showHelpInTooltip={{isHoverable: true}}
+ showHelpInTooltip
help={({model}) =>
tct(
'The amount of time between each uptime check request. Selecting a period of [interval] means it will take at least [expectedFailureInterval] until you are notified of a failure. [link:Learn more].',
@@ -379,7 +379,7 @@ function UptimeAlertFormContent({handleDelete, rule}: Props) {
)}
>
@@ -218,7 +217,6 @@ function CheckInBodyCell({
) : hasOnlySystemSpans ? (
{t('Create Monitor')}
diff --git a/static/app/views/discover/results.tsx b/static/app/views/discover/results.tsx
index 8ae796fc60d1..954d57dfdd33 100644
--- a/static/app/views/discover/results.tsx
+++ b/static/app/views/discover/results.tsx
@@ -1152,7 +1152,7 @@ function DiscoverContextMenu({
key: 'add-to-dashboard',
label: t('Add to Dashboard'),
disabled: deprecatingTransactionsDataset,
- tooltipOptions: {isHoverable: true},
+ tooltipOptions: {},
tooltip:
deprecatingTransactionsDataset && getTransactionDeprecationMessage(tracesUrl),
onAction: () => {
@@ -1367,7 +1367,6 @@ function SaveQueryButton({
deprecatingTransactionsDataset &&
getTransactionDeprecationMessage(tracesUrl)
}
- isHoverable
>
;
}
- return (
-
- {children}
-
- );
+ return {children};
}
diff --git a/static/app/views/explore/components/chart/samplingWarning.tsx b/static/app/views/explore/components/chart/samplingWarning.tsx
index 3373f96a3272..81d32851f9ed 100644
--- a/static/app/views/explore/components/chart/samplingWarning.tsx
+++ b/static/app/views/explore/components/chart/samplingWarning.tsx
@@ -27,12 +27,7 @@ export function SamplingWarning({yAxis, reason}: SamplingWarningProps) {
);
return (
- {title}}
- >
+ {title}}>
);
diff --git a/static/app/views/explore/conversations/components/conversationsTable.tsx b/static/app/views/explore/conversations/components/conversationsTable.tsx
index 18c910d79756..5cea538b1c03 100644
--- a/static/app/views/explore/conversations/components/conversationsTable.tsx
+++ b/static/app/views/explore/conversations/components/conversationsTable.tsx
@@ -438,7 +438,7 @@ function ConversationUserLabel({user}: {user: Conversation['user']}) {
}
return (
- } isHoverable skipWrapper>
+ } skipWrapper>
diff --git a/static/app/views/explore/logs/fieldRenderers.tsx b/static/app/views/explore/logs/fieldRenderers.tsx
index 0b9de1239923..92f236e4bca5 100644
--- a/static/app/views/explore/logs/fieldRenderers.tsx
+++ b/static/app/views/explore/logs/fieldRenderers.tsx
@@ -406,7 +406,6 @@ function FilteredTooltip({
),
}
)}
- isHoverable
>
{children}
diff --git a/static/app/views/explore/logs/logsTimeTooltip.tsx b/static/app/views/explore/logs/logsTimeTooltip.tsx
index 5a735e050004..7fb7a73dbd00 100644
--- a/static/app/views/explore/logs/logsTimeTooltip.tsx
+++ b/static/app/views/explore/logs/logsTimeTooltip.tsx
@@ -151,7 +151,6 @@ export function LogsTimestampTooltip({
}
maxWidth={400}
- isHoverable
>
{children}