-
-
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
[EnhancedButton] remove unnecessary hack, improving overall performance #5868
Conversation
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.
💯
@jampy Thanks for this PR! I agree with your points. Creating an additional layer is a tradeoff that should be well motivated. In our case, that wasn't providing any frame rate improvement, we were just paying the memory cost of them. |
* See: http://stackoverflow.com/questions/17298739/ | ||
* css-overflow-hidden-not-working-in-chrome-when-parent-has-border-radius-and-chil | ||
*/ | ||
transform: disableTouchRipple && disableFocusRipple ? null : 'translate(0, 0)', |
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.
deleting this hack broke our design
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.
Could you provide more detail?
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.
@oliviertassinari we use FloatingActionButton with FontIcon that have rotate on hover, (in this case border radius not working)
fixes #5867
This PR simply removes an older workaround that added a
transform: translate(0,0)
to all buttons. This forced the browser to create a GPU context for each button, preventing optimization of parent elements in some cases.Since EnhancedButton is used in lots of other components, this PR perhaps improves overall performance in complex apps (but help of others is needed to verify this).
Fopr more information please see: