Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
We added this initially to support storing a press position so that indications (such as
Ripple
) know where to draw the ripple from. Because this just ends up storing a value for a given interaction in a map, there's little safety / guarantee that there is a position, and it is not flexible for other metadata outside of position.Additionally, this causes problems when hoisting
InteractionState
and sharing between components, for example a clickableListItem
that contains aButton
:Because the press position is stored per-Interaction and not local to the component, the same position will be used to draw both ripples. This causes strange effects as the ripples appear to start from different places, and if you click on the bigger component then the ripple on the smaller component will start from outside the bounds of the component, since the position is just an absolute offset.
A more common use case is a
ListItem
with aRadioButton
- this is less bad as theRadioButton
(and other selection controls) use a bounded ripple, so the ripple position never changes - but if clicking on theRadioButton
then the ripple for theListItem
will appear in the wrong place.We should figure out:
a) What the correct / expected behavior is - where the ripple of the other component should begin, and how this can be customized
b) How to change the APIs to support the above