-
Notifications
You must be signed in to change notification settings - Fork 258
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 and Tweak Animations #4710
Fix and Tweak Animations #4710
Conversation
859a5d7
to
d70635a
Compare
src/components/common/EdgeAnim.tsx
Outdated
* anim => disable animation but still render a container view | ||
* view => render the children with no container view | ||
* */ | ||
disable?: 'anim' | 'view' |
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.
Why is this an enumeration? I think it's clear through the API and component name that a boolean true here means just the lack of animation.
In general I think it's clearer to have named value enums, though the rest of our app has a pattern of disable
being a boolean flag. One less thing to hover would be nice and usage would have less code.
If there's future plans to have more disable configuration types then a different prop name seems more appropriate
@@ -81,8 +81,9 @@ const CoinRankingComponent = (props: Props) => { | |||
const key = `${index}-${item}-${rank}-${currencyCode}-${lastUsedFiat}` | |||
debugLog(LOG_COINRANK, `renderItem ${key.toString()}`) | |||
|
|||
const disable = index >= MAX_LIST_ITEMS_ANIM ? 'view' : undefined |
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.
If disable
we're just a boolean this would simply be const disable = index >= MAX_LIST_ITEMS_ANIM
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.
As mentioned above. There are necessarily two types of view disables so that we don't render extra Views if not needed.
Disable layout animations that are also gesture animated. These are broken on Android
d70635a
to
46cab82
Compare
/rebase |
46cab82
to
01a8a3f
Compare
01a8a3f
to
fc7c885
Compare
Disable layout animations that are also gesture animated. These are broken on Android
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have: