From a522f750e1078ad9e9a5fffff01caa1e9f91fdce Mon Sep 17 00:00:00 2001 From: Rajdeep Chandra Date: Mon, 21 Apr 2025 16:43:14 +0530 Subject: [PATCH 1/4] chore: added story to demonstrate a delayed tooltip example --- packages/tooltip/stories/tooltip.stories.ts | 101 ++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/packages/tooltip/stories/tooltip.stories.ts b/packages/tooltip/stories/tooltip.stories.ts index abde4c0e012..740a7a1150b 100644 --- a/packages/tooltip/stories/tooltip.stories.ts +++ b/packages/tooltip/stories/tooltip.stories.ts @@ -22,6 +22,10 @@ import '@spectrum-web-components/textfield/sp-textfield.js'; import '@spectrum-web-components/action-button/sp-action-button.js'; import { Placement } from '@spectrum-web-components/overlay'; import '@spectrum-web-components/overlay/sp-overlay.js'; +import '@spectrum-web-components/popover/sp-popover.js'; +import '@spectrum-web-components/overlay/overlay-trigger.js'; +// Import Overlay type for type casting +import type { Overlay } from '@spectrum-web-components/overlay'; const iconOptions: { [key: string]: ({ @@ -454,3 +458,100 @@ draggable.parameters = { // Disables Chromatic's snapshotting on a global level chromatic: { disableSnapshot: true }, }; + +export const DelayedTooltipWithOverlay = (): TemplateResult => { + return html` +
+

Delayed Tooltip Overlay Interaction Issue

+ +
+ + + Click to Open Popover + + + +
+

Opened Popover

+

+ This popover should stay open during tooltip + warmup +

+

+ Steps to test: + With this popover open, hover the button to the + right. +

+
+
+
+ + + { + // Capture phase event handler to stop propagation during warmup + // This ensures other overlays don't close prematurely + event.stopPropagation(); + }} + > + Hover me + + { + const popoverOverlay = document.getElementById( + 'popover-overlay' + ) as Overlay; + if ( + popoverOverlay && + popoverOverlay.hasAttribute('open') + ) { + popoverOverlay.open = false; + } + }} + > + This is a delayed tooltip + + +
+ +
+

Expected Behavior

+
    +
  1. + Click the + Click to Open Popover + button to open the popover +
  2. +
  3. + Hover over the + Hover me + button +
  4. +
  5. + The popover should + remain open + during the tooltip's 1-second warmup period +
  6. +
  7. + The popover should + automatically close + when the tooltip appears in DOM +
  8. +
+
+
+ `; +}; From 249fd7a266a03ce9de5017380e6e39b9e09f2a2c Mon Sep 17 00:00:00 2001 From: Rajdeep Chandra Date: Mon, 21 Apr 2025 17:22:54 +0530 Subject: [PATCH 2/4] chore: added changeset --- .changeset/slimy-terms-hang.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/slimy-terms-hang.md diff --git a/.changeset/slimy-terms-hang.md b/.changeset/slimy-terms-hang.md new file mode 100644 index 00000000000..e69e2126348 --- /dev/null +++ b/.changeset/slimy-terms-hang.md @@ -0,0 +1,5 @@ +--- +'@spectrum-web-components/tooltip': patch +--- + +docs: add DelayedTooltipWithOverlay story demonstrating how to handle interactions between delayed tooltips and other overlay components From 29732fcf72fb0816ca58c45426993d5223b958ef Mon Sep 17 00:00:00 2001 From: Rajdeep Chandra Date: Mon, 21 Apr 2025 17:24:14 +0530 Subject: [PATCH 3/4] ci: updated golden image cache --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ff0bc49889..030e46e4157 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ parameters: # 3. Commit this change to the PR branch where the changes exist. current_golden_images_hash: type: string - default: b0d2aeac6eaa2bcac5e665c59817edf2d52c7b13 + default: a522f750e1078ad9e9a5fffff01caa1e9f91fdce wireit_cache_name: type: string default: wireit From 9660dfe91c18cbf7116330e46b38ea2f4fc889fc Mon Sep 17 00:00:00 2001 From: Rajdeep Chandra Date: Fri, 25 Apr 2025 15:01:49 +0530 Subject: [PATCH 4/4] ci: update golden image cache --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ade1019794..7aa02cd3f97 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ parameters: # 3. Commit this change to the PR branch where the changes exist. current_golden_images_hash: type: string - default: 3412e93be28e587e2ded76d6c19d051e401e2623 + default: b7ea01b7daaccc2c345f09b26beb38c0a3791f8b wireit_cache_name: type: string default: wireit