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

Fix and Tweak Animations #4710

Merged
merged 2 commits into from
Jan 17, 2024
Merged

Fix and Tweak Animations #4710

merged 2 commits into from
Jan 17, 2024

Conversation

paullinator
Copy link
Member

@paullinator paullinator commented Jan 13, 2024

Disable layout animations that are also gesture animated. These are broken on Android

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@paullinator paullinator changed the title Fix welcome scene animations on android Fix and Tweak Animations Jan 14, 2024
@paullinator paullinator force-pushed the paul/fixWelcomeAnims branch 3 times, most recently from 859a5d7 to d70635a Compare January 15, 2024 07:31
* anim => disable animation but still render a container view
* view => render the children with no container view
* */
disable?: 'anim' | 'view'
Copy link
Collaborator

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
Copy link
Collaborator

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

Copy link
Member Author

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
@paullinator
Copy link
Member Author

/rebase

@paullinator paullinator merged commit 13673e6 into develop Jan 17, 2024
2 checks passed
@paullinator paullinator deleted the paul/fixWelcomeAnims branch January 17, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants