-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[SpeedDial] Open/Close synchronous #25320
Conversation
@material-ui/core: parsed: -0.07% 😍, gzip: -0.06% 😍 |
Looks good to me but I found another existing bug so automatic coverage might be incomplete. Maybe manual review finds more stress cases |
I recall working on this logic in #17301. Let's see if I can notice a regression with the change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we can/should add a new regression test case. The nominal use case of the speed dial doesn't work with the change.
I'm saying nominal because the only environment in which Material Design mentions the component is: mobile. Google used to use it on desktop at some point, but remove them all AFAIK (e.g. Google Inbox which was decommissioned)
On a related note, we can link Material Design to https://material.io/components/buttons-floating-action-button#types-of-transitions in the docs. There are no chips for it. fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity, a failing example:
- Open https://deploy-preview-25320--material-ui.netlify.app/components/speed-dial/#basic-speed-dial on mobile (e.g. iPhone simulator, a real Android, Chrome mobile simulator)
- Tap on the FAB to open the speed dial, it won't open.
That's odd that focus/blur logic would impact tapping on mobile. |
That's not clarity. The previous comment did not contribute anything to this PR. |
The SpeedDial is unorthodox regarding it's opening mechanism. We'd have to batch a complete user tap to make this work. Unorthodox regarding that hover and click toggles the open state. It should be either or. The explainer in code comments is incomplete at the moment and misleading. Will not spend time on it since I don't understand what context triggered that kind of review above. Seems like the component implements behavior that is not publicly documented. |
Do you mean that Google has removed the speed dial from all its product? I personally can't find one where it's still used :/ (For instance, I have checked the 18 installed Google app my phone has). |
Experiment with leveraging React's batching semantics/event.relatedTarget over setTimeout