-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TouchRipple] Do not trigger it when scrolling #23808
Comments
@manuelpaulo The behavior in the video looks correct, the ripple is interpreted as soon as you start scrolling. What I am missing? |
Hi, thanks for the fast reply. What is wrong? Why is wrong? Why now? Is it serious? |
@manuelpaulo Do you have a recording with our components, for instance, the list https://next.material-ui.com/components/lists/#lists? You seem to make references to native Android components. |
Sure: https://www.dropbox.com/s/p3dm2st04a0qaza/IMG_3644.MOV?dl=0 |
@manuelpaulo Ok thanks for the recording. I'm closing for #2165. This is part of the tradeoff. |
Seems like you did fix it temporarily in #8605. That video shows the same interaction as the recorded video in the dropbox. So it's unclear what the "tradeoff" is here. What this ultimately comes down to is in which we purposely trigger the ripple even though we kow it was cancelled. Seems to me we should actually skip it if we haven't started. |
@manuelpaulo Could you try out https://deploy-preview-23829--material-ui.netlify.app/components/lists/ (might take a few minutes till it's build) and tell me if that feels better to you? |
I believe there are different aspects in the tradeoff. The most direct one is the amount of time we wait before firing the ripple |
The DELAY_RIPPLE tradeoff I understand. It's a classic fine-tuning issue that will never cover all users properly. What I'm missing is why we skip the DELAY_RIPPLE if the touch is interrupted (pressumably that's what |
I think that the idea what to still retain a "smooth" UX, avoiding the UI to flash when interrupting the ripple for a late scroll intent. Instead, we continue on the inertia of the ripple already visible. Making it progressively disappear. |
As far as I can tell the linked code is not concerned with an already visible ripple. Instead it will immediately display the ripple that we delayed for DELAY_RIPPLE ms. So the user wouldn't even notice it because we assume that a touch phase shorter than DELAY_RIPPLE is not an intentional touch. Update: |
Agree 👍 , I was answering on a tangent in #23808 (comment). |
To remove any potential sources of confusion, this approach breaks the ripple for fast interactions, I don't think that we can rely on it. For instance, in the following case, a click event is triggered but no visual feedback is provided (ripple): |
That was my suspicion. A click should always trigger the ripple. Could you test this on a real device and verify there is actually a |
I have tested on a Xiaomi Mi 9 phone, with Android, MIUI 11, and Chrome latest. The default for me is to have the collapse open/close without ripple. I have to make a "slow" tap to see it. Tested on this demo: https://deploy-preview-23829--material-ui.netlify.app/components/lists/#nested-list. |
Sorry for the late reply. I've tested it and it seems way much better. Only getting wrongly the effect when scrolling down and then immediately changing my mind and scrolling back up. |
I'm re-opening for visibility. As a next step we need to figure out why #23829 prevents a ripple for clicks and then check if this still improves the story in this issue. Might very well be that the device @manuelpaulo has actually triggers clicks in which case it becomes not viable to fix the issue from our side. |
@eps1lon I think that you are hitting the core of the tradeoff. On touch start, the component schedules the ripple after 80ms. If a touch move is triggered before the end of the 80ms, we unscheduled the ripple. If the touch end triggers before the end of the 80ms, we trigger the ripple. Why are we using 80ms? It was meant to provide feedback to users under 100ms so it feels like the UI responds instantly, starting from the touch start. Considering the tradeoff if 4 years old, it makes sense to benchmark what other are doing. Maybe they have found better solutions.
One this I would like to mention is #19664, which I think is more important than this issue. The current implementation of the ripple doesn't seem aligned anymore with how Google implements it on its product, or on the Material Design spec. Nowadays, the ripple seems to start with a wider surface and to move faster. I have added a screen recorder on the issue to better compare the "feeling". |
I've checked #3407, but I honestly think it's still not fixed, or is it back?!
https://www.dropbox.com/s/jm36onjlml8j9oq/IMG_3636.MOV
Thanks a lot.
The text was updated successfully, but these errors were encountered: