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

[FAB][DOCS] Floating action button ripple effect broken in demo #27973

Open
2 tasks done
rajzik opened this issue Aug 26, 2021 · 4 comments · May be fixed by #27976
Open
2 tasks done

[FAB][DOCS] Floating action button ripple effect broken in demo #27973

rajzik opened this issue Aug 26, 2021 · 4 comments · May be fixed by #27976

Comments

@rajzik
Copy link
Task lists! Give feedback
Contributor

@rajzik rajzik commented Aug 26, 2021

FAB in documentation size demo has broken ripple effect.

https://next.material-ui.com/components/floating-action-button/#size

image

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Demo for v5 ripple effect broken for size example

Expected Behavior 🤔

Demo for v4

https://material-ui.com/components/floating-action-button/#floating-action-button

image

Steps to Reproduce 🕹

Open chrome

https://next.material-ui.com/components/floating-action-button/#size

Steps:

  1. Open chrome
  2. Open https://next.material-ui.com/components/floating-action-button/#size
  3. Try to click or focus on FAB
  4. Ripple effect is broken

Context 🔦

It would great to have working example on documentation page. I saw this couple releases ago and this issue persist, so I am raising it now.

@rajzik
Copy link
Contributor Author

@rajzik rajzik commented Aug 26, 2021

Maybe the issue is with styling in:

import * as React from 'react';
- import Box from '@material-ui/core/Box';
+ import Stack from '@material-ui/core/Stack';
import Fab from '@material-ui/core/Fab';
import AddIcon from '@material-ui/icons/Add';

export default function FloatingActionButtonSize() {
  return (
-    <Box
-      sx={{
-        '& :not(style)': { m: 1 },
-      }}
-    >
+    <Stack direction="row" spacing={1}>
      <Fab size="small" color="secondary" aria-label="add">
        <AddIcon />
      </Fab>
      <Fab size="medium" color="secondary" aria-label="add">
        <AddIcon />
      </Fab>
      <Fab color="secondary" aria-label="add">
        <AddIcon />
      </Fab>
-    </Box>
+    </Stack>
  );
}

@mnajdova
Copy link
Member

@mnajdova mnajdova commented Aug 26, 2021

Yes, the issue comes from the selector used on the Box, it is too wide. It should be '& > :not(style)': { m: 1 }, but even better if we go with the Stack component.

Would you like to create a PR with the changes you proposed @rajzik? :)

@rajzik
Copy link
Contributor Author

@rajzik rajzik commented Aug 26, 2021

@mnajdova Sure, I will do it later today.

@rajzik rajzik linked a pull request that will close this issue Aug 26, 2021
1 task
@rajzik
Copy link
Contributor Author

@rajzik rajzik commented Aug 26, 2021

@mnajdova nvm PR is now up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants