Skip to content

core: add TooltipElement and route HasTooltipElement through it (#139) - #180

Merged
jcgueriaud1 merged 1 commit into
masterfrom
claude/dramafinder-issue-139
Sep 15, 2026
Merged

jcgueriaud1 merged 1 commit into
masterfrom
claude/dramafinder-issue-139

Conversation

@jcgueriaud1

Copy link
Copy Markdown
Collaborator

Wrap vaadin-tooltip as a standalone element: text, opened state, position, and a helper that opens the tooltip by hovering its target.

HasTooltipElement becomes a facade over the new element rather than a parallel API — getTooltip() returns a TooltipElement, and the existing getTooltipLocator() / getTooltipText() / assertTooltipHasText() delegate to it, so callers are unaffected.

Two behaviours the API had to be shaped around:

  • The host is display: contents and renders through the overlay in its shadow DOM, so open/closed is asserted on the reflected opened attribute; getOverlayLocator() is there for tests that need the box.
  • Tooltip.setPosition(...) only sets a DOM property on the host — the overlay is what reflects the effective position (default bottom), so that is where getPosition() reads it.

Wrap `vaadin-tooltip` as a standalone element: text, opened state,
position, and a helper that opens the tooltip by hovering its target.

`HasTooltipElement` becomes a facade over the new element rather than a
parallel API — `getTooltip()` returns a `TooltipElement`, and the existing
`getTooltipLocator()` / `getTooltipText()` / `assertTooltipHasText()`
delegate to it, so callers are unaffected.

Two behaviours the API had to be shaped around:

- The host is `display: contents` and renders through the overlay in its
  shadow DOM, so open/closed is asserted on the reflected `opened`
  attribute; `getOverlayLocator()` is there for tests that need the box.
- `Tooltip.setPosition(...)` only sets a DOM property on the host — the
  overlay is what reflects the effective position (default `bottom`), so
  that is where `getPosition()` reads it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jcgueriaud1
jcgueriaud1 merged commit 6bf09cd into master Sep 15, 2026
3 checks passed
@jcgueriaud1
jcgueriaud1 deleted the claude/dramafinder-issue-139 branch September 15, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant