adobe / adobe/spectrum-web-components

[Bug]: Tooltip and Popover (with tip) should have the same distance from trigger in overlay-trigger with same offset value

Open
#3,321 3 comments 0 reactions 0 assignees View on GitHub
bug Component:Overlay Component:Popover Component:Tooltip SEV missing Spectrum CSS
Dominant language
TypeScript
Stars
1.5k
Forks
262
Avg merge
3d 10h
Merged PRs (30d)
68

Description

### Code of conduct

- [X] I agree to follow this project's code of conduct.

### Impacted component(s)

Overlay, Tooltip, Popover

### Expected behavior

If we use `` with (or without) offset attribute - this (default) offset value should lead to same distance of tooltips and popover (with tip element) to the trigger element.

### Actual behavior

If you compare tooltip and popover here at https://studio.webcomponents.dev/edit/mOF1zUEjLJzODGXFYaIU/src/index.ts?branch=dfda%40yOBt1947wIZCL9LXYVLsyGBLOok1&p=stories - it is not aligned, although no offset values are provided.
Screenshot 2023-06-15 at 08 55 42

### Screenshots

_No response_

### What browsers are you seeing the problem in?

_No response_

### How can we reproduce this issue?

1. Go to https://studio.webcomponents.dev/edit/mOF1zUEjLJzODGXFYaIU/src/index.ts?branch=dfda%40yOBt1947wIZCL9LXYVLsyGBLOok1&p=stories
2. Click on action button to open popover
3. Close popover and hover over action button
4. Compare distances/offsets from trigger button to overlaid content

### Sample code that illustrates the problem

_No response_

### Logs taken while reproducing problem

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked Web Components Studio reproduction and compare the positioning behavior of Overlay, Tooltip, and Popover, including Popover's tip element. The work is done when Tooltip and Popover with a tip have the same distance from the trigger for the same offset, both with the default offset and an explicit offset.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.