From 0d3f3fd98cddb3c39e028b9cbdcd24a2bd8cd071 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Fri, 5 May 2023 16:30:59 -0400 Subject: [PATCH] No hovercard for tool and platform pickers (#36905) --- components/LinkPreviewPopover.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/LinkPreviewPopover.tsx b/components/LinkPreviewPopover.tsx index 022c365bbc5a..e4f0ca4808d3 100644 --- a/components/LinkPreviewPopover.tsx +++ b/components/LinkPreviewPopover.tsx @@ -356,7 +356,11 @@ export function LinkPreviewPopover() { link.href.startsWith(window.location.origin) && !link.classList.contains('heading-link') && !pathname.startsWith('/public/') && - !pathname.startsWith('/assets/') + !pathname.startsWith('/assets/') && + // This skips those ToolPicker links with `data-tool="vscode"` + // attribute, for example. + !link.dataset.tool && + !link.dataset.platform ) })