KEMBAR78
refactor!: update tooltip overlay to use native popover by web-padawan · Pull Request #9760 · vaadin/web-components · GitHub
Skip to content

Conversation

@web-padawan
Copy link
Member

Description

Fixes #9712

Type of change

  • Breaking change

super.updated(props);

if (props.has('text') || props.has('generator') || props.has('context')) {
this.__updateContent();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this method. It mainly exists because of an ugly internal hack which is likely used in some customer project and relies on patching _renderer. Maybe we can just break that assumption and inline setting textContent here in updated().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't really hurt to keep it.

@sonarqubecloud
Copy link

@web-padawan web-padawan requested a review from sissbruecker July 17, 2025 10:13
_hideTooltip(immediate) {
const tooltip = this._tooltipController && this._tooltipController.node;
if (tooltip) {
this._tooltipController.setContext({ item: null });
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, tooltip was preserving the text after closing, which is rather unexpected. Tests didn't catch that because the IT assertion returned null if no vaadin-tooltip-overlay was found in the document.

@web-padawan web-padawan merged commit 164719f into main Jul 18, 2025
12 of 13 checks passed
@web-padawan web-padawan deleted the refactor/native-popover-tooltip branch July 18, 2025 09:58
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 25.0.0-alpha3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tooltip] Update to use native popover for the overlay element

3 participants