On the video we see that when the cursor is over the tooltip, we can't press on Button.
With current Popup's it is impossible to implement, because we can't create Popup's which pass events to the underlying content.
Introducing something like hoverable: Boolean isn't the right approach to fix the issue, because we would only fix one issue, and make Popup behavior more complex. Popup can have non-hoverable parts and hoverable parts. See for example context menu in Chrome, it doesn't intercept clicks, when we click on this part of the popup (red dot):
Also, we probably should deprecate focusable: Boolean property, because it have narrow application, and have some unexpected behavior. The initial purpose of it was to allow to popup components to take focus (like TextField). But why, for example, this property also decides how popup should be closed with the mouse. Instead, focusability should be enabled by default, and shouldn't affect how pointer events passes down to the component tree.
Instead of focusable/hoverable we should probably route all events based on component Modifier's. I.e. by default, it passes down all events (for all passes of PointerEventPass), and only if Popup contains some component that consumes event (like clickable), it shouldn't pass event further.
During the redesign, we should keep in mind that we need to maintain backward compatibility.
Compose 1.0.0
Tooltip exists for only one purpose - to give the hint (or additional information) about the element.
If tooltip overlays the element, it should still allow to click the element, and don't intercept mouse event itself
https://user-images.githubusercontent.com/5963351/144711029-96d0df97-b5cd-4b13-8190-64b6e0553018.mp4
On the video we see that when the cursor is over the tooltip, we can't press on Button.
With current Popup's it is impossible to implement, because we can't create Popup's which pass events to the underlying content.
Introducing something like
hoverable: Boolean
isn't the right approach to fix the issue, because we would only fix one issue, and make Popup behavior more complex. Popup can have non-hoverable parts and hoverable parts. See for example context menu in Chrome, it doesn't intercept clicks, when we click on this part of the popup (red dot):Also, we probably should deprecate
focusable: Boolean
property, because it have narrow application, and have some unexpected behavior. The initial purpose of it was to allow to popup components to take focus (like TextField). But why, for example, this property also decides how popup should be closed with the mouse. Instead, focusability should be enabled by default, and shouldn't affect how pointer events passes down to the component tree.Instead of
focusable
/hoverable
we should probably route all events based on component Modifier's. I.e. by default, it passes down all events (for all passes of PointerEventPass), and only if Popup contains some component that consumes event (likeclickable
), it shouldn't pass event further.During the redesign, we should keep in mind that we need to maintain backward compatibility.