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

AddAPhoto Icon clip-path causes icon to not display under specific circumstances #12441

Closed
1 task done
kevinnorris opened this issue Aug 8, 2018 · 3 comments
Closed
1 task done
Labels
bug 🐛 Something doesn't work component: SvgIcon The React component. external dependency Blocked by external dependency, we can’t do anything about it

Comments

@kevinnorris
Copy link
Contributor

If you render the AddAPhoto icon in a parent that toggles visibility between hidden and visible, then render multiple of these components on the screen all icons are hidden if the first one is hidden. No matter how you toggle the remaining component.

If the clip-path is removed from the icon then it renders properly.

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

The icons should hide and show irrespective of other components on the page.

Current Behavior

The first icon toggles correctly and all other instances of the icon only toggle properly if the first one is visible.

Steps to Reproduce

Link: https://codesandbox.io/s/o5y25ll0jq

  1. The second icon in the "with clip-path" column should display, it does not.
  2. Click show in the "with clip-path" column and the second icon will now be toggleable
  3. Hide the first icon again and the second icon once again is hidden no matter the toggle

Context

We have a page with multiple components that transition between visibility and these components have icons in them. The AddAPhoto icon no longer displays properly due to the clip-path.

Your Environment

Tech Version
OS Mac High Sierra
Material-UI/icons v2.0.1
Chrome 68.0.3440.84
Firefox 61.0.1
@oliviertassinari oliviertassinari added external dependency Blocked by external dependency, we can’t do anything about it bug 🐛 Something doesn't work component: SvgIcon The React component. labels Aug 8, 2018
@oliviertassinari
Copy link
Member

@kevinnorris The clip-path comes from the material design icons of Google. We don't add them on purpose. We have tried to remove them in the past, but it was breaking some icons. We gonna have to try harder to remove them.

@kevinnorris
Copy link
Contributor Author

kevinnorris commented Aug 8, 2018

Would you be open to a PR that removes clip-path from the AddAPhoto icon?

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 8, 2018

@kevinnorris The icons are automatically generated. If you find a way to update the script that doesn't alter the visual output, definitely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: SvgIcon The React component. external dependency Blocked by external dependency, we can’t do anything about it
Projects
None yet
Development

No branches or pull requests

2 participants