Skip to content
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] Actions container takes has full height when closed (and trigger hover event) #12082

Closed
2 tasks done
araujoigor opened this issue Jul 7, 2018 · 3 comments
Closed
2 tasks done
Labels
component: speed dial This is the name of the generic UI component, not the React module!

Comments

@araujoigor
Copy link

  • This is a v1.x issue (v0.x is no longer maintained).
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When the SpeedDial is closed (no actions being shown) the action container should be fully colapsed and have no height, not triggering events such as hover, for example (only the FAB itself should trigger the hover).

Current Behavior

When the SpeedDial is closed (no actions being shown) the action container still has the same height as when it is open and therefore trigger onHover on places it shouldn't (eventually preventing actions on elements "behind" it.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/k00ymzjj5v

  1. Hover a few pixels above the FAB
  2. Observe that the actions show up since the "empty" container still had its full-height

Context

I'm using the component for a personal project and believe that triggering the hover effect on the "invisible" action elements is a bad UX and a unwanted behavior.

Your Environment

Tech Version
Material-UI ^1.2.1
React ^16.4.0
browser All, browser independent issue - Safari 11.1, Chrome 67, Firefox 61
@mbrookes
Copy link
Member

mbrookes commented Jul 7, 2018

triggering the hover effect on the "invisible" action elements is a bad UX

@araujoigor I had the same thought, but I left it because of: https://inbox.google.com/ (Not saying they are right of course!)

Do you want to work on it?

@mbrookes mbrookes added the component: speed dial This is the name of the generic UI component, not the React module! label Jul 7, 2018
@oliviertassinari oliviertassinari added the package: lab Specific to @mui/lab label Jul 7, 2018
@araujoigor
Copy link
Author

@mbrookes Interesting... Never realized Inbox had such behavior... I assume it is because they leave the entire "row" for the FAB and its actions... But still, I don't like much.

Sure, I can work on that. Any suggestions on the implementation? Since transitioning display is not an option, the only two solutions that come to my mind are either to transition max-height (which is a bit hacky and could possibly lead to undesired effects and because we limit the height) or add a callback with setTimeout to add a class with display: none.

@mbrookes
Copy link
Member

mbrookes commented Jul 8, 2018

We could possibly unmount the actions when they're closed, although not sure what that would do for performance when you hover over the FAB. (Should be okay, given they animate in).

The only alternative I can think of would be to proxy mouse events from the FAB...

mbrookes added a commit that referenced this issue Jul 25, 2018
Also allows interaction with elements beind the actions when closed

<!-- Thanks so much for your PR, your contribution is appreciated! ❤️ -->

Closes #11138
Closes #12082
@oliviertassinari oliviertassinari removed the package: lab Specific to @mui/lab label Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: speed dial This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants