-
Notifications
You must be signed in to change notification settings - Fork 206
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
fix(compass-components): do not keep fallback content when not needed COMPASS-7417 #5111
fix(compass-components): do not keep fallback content when not needed COMPASS-7417 #5111
Conversation
@@ -114,12 +114,14 @@ const fallbackContainer = css({ | |||
bottom: 0, | |||
left: 0, | |||
opacity: 0, | |||
transition: 'opacity .16s ease-out', | |||
transition: 'opacity display .16s ease-out', |
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.
i almost feel this can just be confusing at this point, should we just drop it?
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.
unless i'm missing something ..
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.
this has a nice side-effect that the visibility(coming into view) of fallback content still gets animated nicely.
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.
actually there very little difference (just checked again), maybe i will just remove it to cut down any confusion here.
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.
done 👍
Description
The fallback content kept rendering css keyframes with opacity 0 which ended up consuming a lot of CPU as seen in the Activity monitor. As I understand, we probably wanted to workaround the inability to animate css display property here and although with the change in place, there is a slight difference in the output, it is probably worth getting to normal CPU usage.
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes