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

chore(wallet): Upgrade Reanimated Library #1039

Merged
merged 5 commits into from May 13, 2023
Merged

Conversation

coreyphillips
Copy link
Collaborator

@coreyphillips coreyphillips commented May 12, 2023

Description

  • Upgrades react-native-reanimated to 3.1.0.
  • Updated SwipeToConfirm component.
  • Removes all instances of LayoutManager.

Type of change

  • New feature (non-breaking change which adds functionality)

Tests

  • No test

QA Notes

  • Ensure the reanimated components continue to work as expected throughout the app.
  • To test the updated SwipeToConfirm component, navigate to the "ReviewAndSend" view by pasting a Bitcoin/Lightning address after tapping "Send", select "Max" amount, slide to confirm and select "No". The slider should reset prior to navigating back to the previous view.

Upgrades react-native-reanimated to 3.1.0.
Upgrades react-native-gesture-handler to 2.10.0.
Updated SwipeToConfirm component.
Added swipeToConfirmRef ref to SwipeToConfirm component and implemented it in ReviewAndSend.
Copy link
Collaborator

@limpbrains limpbrains left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App now throws a lot of annoying Overriding previous layout animation... warning. Can this be fixed?

Also I don't understand why new ref.reset() method is needed, if there is already an animation when you change loading prop from true to false ? I've tried to comment it out, still works as expected. Am I missing something?

Simulator.Screen.Recording.-.iPhone.14.-.2023-05-12.at.16.53.42.mp4

@coreyphillips
Copy link
Collaborator Author

coreyphillips commented May 12, 2023

Unfortunately, I haven't found a way to rid that warning. Looking into it.

On my Android device at least, the loading indicator and circle position would never reset and remain locked in the final state. So providing parent components a way to reset the state after certain actions (Selecting no when the alert appears in this case) fixes it.

@limpbrains
Copy link
Collaborator

limpbrains commented May 12, 2023

On my Android device at least, the loading indicator and circle position would never reset and remain locked in the final state. So providing parent components a way to reset the state after certain actions (Selecting no when the alert appears in this case) fixes it.

To archive this try to replace await swipeToConfirmRef.current?.reset(); with setIsLoading(false);

untitled.webm

@coreyphillips
Copy link
Collaborator Author

coreyphillips commented May 12, 2023

Looks like the warning is due to the use of LayoutAnimation in a component. Ex LayoutAnimation.easeInEaseOut(); We could just remove them completely. Looking to see if we can get around that though.

@coreyphillips
Copy link
Collaborator Author

On my Android device at least, the loading indicator and circle position would never reset and remain locked in the final state. So providing parent components a way to reset the state after certain actions (Selecting no when the alert appears in this case) fixes it.

To archive this try to replace await swipeToConfirmRef.current?.reset(); with setIsLoading(false);

untitled.webm

Updated here.

@coreyphillips
Copy link
Collaborator Author

I opted to remove the old LayoutAnimation implementations in order to remove the warnings that we're seeing here.

@coreyphillips coreyphillips merged commit 4e4fb07 into master May 13, 2023
5 checks passed
@coreyphillips coreyphillips deleted the upgrade-reanimated branch May 13, 2023 16:33
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.

None yet

2 participants