Status Update
Comments
co...@google.com <co...@google.com>
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #2
More suggestions:
-
Allow to override containerElevation for RichTooltipBox - RichTooltipColors has container param, but doesn't allow overriding containerElevation (which mixes color with theme primary color, resulting in undesired color)
-
Allow to set or suggest the position of shown tooltip.
-
When isPersistent=true, allow dismissing by clicking outside and still passing through the click event
For example, when some persistent tooltip is shown for a button in screen's top area, user should be able to click something else in screen without having to click twice (once to dismiss the tooltip, second time to actually dismiss the tooltip)
-
Allow to customize PlainTooltipMaxWidth/RichTooltipMaxWidth
-
Accessibility - Hard to close isPersistent=true tooltip in TalkBack mode by clicking outside (this is probably an issue with PopupWindow itself)
-
Accessibility - TalkBack says "Popup window" when tooltip is shown (might be expected)
-
M3 spec doesn't seem to allow it, but tooltip arrows would be also useful. If not added to spec, maybe expose some currently internal stuff in M4 Tooltip implementation that will allow developers to implement arrows without having to rewrite it all?
na...@google.com <na...@google.com> #3
It sounds like the autohide behavior you are looking for is similar to the isPersistent parameter for tooltip state:
When this is set to true, the tooltip should be able to remain on the screen until the user clicks outside of it. The request for a modifiable timeout seems reasonable to me, wdyt Kevin? Something to defer to design perhaps?
co...@gmail.com <co...@gmail.com> #4
@isPersistent = false
to rememberTooltipState()
. These changes might not be available yet in the current release, but it should be included in the next one. Thanks!
Plain tooltip should be used for quick descriptions, if you have a lot of text that requires longer than 1.5 seconds to read please use rich tooltip and make it actionable.
@
- I think this is a reasonable ask, will file a bug to address.
- We recently merged a change to tooltips that exposes the
PopupPositionProvider
, you should be able to alter the actual position with this parameter. - You can use the
focusable
parameter to achieve this flow. - Dallas What do you think about exposing the maxWidth for Plain and Rich tooltips? From my understanding, this isn't something that we normally expose.
- Yeah this is part of the
Popup
implementation. If you'd like to escalate you can file an accessibility bug with the wider compose team. - Yup, this is expected.
- This is something that we're currently working on! No exact ETA, but it would be in M3.
Description
Jetpack Compose component used:material3
Android Studio Build:Android Studio Electric Eel | 2022.1.1 Patch 1
Build #AI-221.6008.13.2211.9514443, built on January 21, 2023
Kotlin version:1.8.10
material3 version:1.1.0-alpha07