Open igordmn opened 4 months ago
Investigated BasicTooltipBox
a bit. It doesn't seem suitable for desktop needs.
✅ I'm not sure what isPersistent
does as it doesn't seem to have an effect on the desktop. Tooltips disappear immediately when the mouse cursor leaves the box.
❌ Tooltips appear immediately, without delay, when the mouse pointer is moved into the box.
❌ The positionProvider
argument isn't documented properly. The user is left to guess where he could obtain a useful implementation (rememberComponentRectPositionProvider
is one)
❌ There's no positionProvider
implementation equivalent to TooltipPlacement.CursorPoint
. rememberCursorPositionProvider
remembers the position of the mouse pointer at the time of invocation.
The same comments apply to TooltipBox
(which is also only available in material3).
Related: #4321
I see there's TooltipDefaults.rememberPlainTooltipPositionProvider
which only positions the tooltip above the box.
TooltipArea
was designed for desktopMain
and works well, but having 2 similar available API's doing one thing isn't good from the user perspective. We need to merge functionality with BasicTooltipBox
(or with something else that will be instead of it)
And move all necessary functionality there.
There should be only one non-experimental way to show tooltips.
Check also, how
TooltipBox
works. One of the known issues - it hasisPersistent = false
by default, which works bad on desktop.