HomePhabricator
Diffusion Comm 44c6957aa85a

[native] Migrate useOverlayPosition, useContentAndHeaderOpacity…

Description

[native] Migrate useOverlayPosition, useContentAndHeaderOpacity, useDeliveryIconOpacity hooks to Reanimated V2 API

Summary:
Ideally I'd split it into 3 diffs but I guess it would be more trouble than it's worth because both useContentAndHeaderOpacity and useDeliveryIconOpacity use useOverlayPosition so I'd need to create a temporary copy of useOverlayPosition that returns v2, migrate useContentAndHeaderOpacity, migrate useDeliveryIconOpacity and delete a copy of useOverlayPosition that returns v1. And the migration here is straightforward: instead of returning a number or reanimated node we return a SharedValue from useDerivedValue with the exact same logic and I replaced useMemo with useAnimatedStyle when needed.

Depends on D14127

Test Plan: Open up a tooltip on text and robotext message and navigate to thread. Verify the transition looks correctly.

Reviewers: ashoat, tomek

Reviewed By: ashoat

Differential Revision: https://phab.comm.dev/D14128