Page MenuHomePhabricator

[native] Migrate animated styles to Reanimated v2 API in FullScreenViewModal
ClosedPublic

Authored by angelika on Feb 6 2025, 5:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 20, 4:57 PM
Unknown Object (File)
Wed, Mar 19, 4:55 AM
Unknown Object (File)
Wed, Mar 19, 4:53 AM
Unknown Object (File)
Wed, Mar 19, 4:47 AM
Unknown Object (File)
Wed, Mar 19, 4:46 AM
Unknown Object (File)
Wed, Mar 19, 3:32 AM
Unknown Object (File)
Wed, Mar 19, 3:30 AM
Unknown Object (File)
Mon, Mar 17, 11:06 PM
Subscribers

Details

Summary

https://linear.app/comm/issue/ENG-8150/convert-fullscreenviewmodal-to-reanimated-2-syntax

  • move styles and calculating styles to useAnimatedStyle
  • use positionV2 instead of position from overlay context

Also from this diff on the component should work correctly.

Depends on D14311

Test Plan

Verify the image is zoomed in/out, panned correctly.
Verify the buttons have correct opacity.
Verify the backdrop has correct opacity.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

angelika held this revision as a draft.
native/components/full-screen-view-modal.react.js
834–835 ↗(On Diff #46956)

You can't use props object in a worklet, because it will cause a weird crash (Cannot add new property '__reanimatedHostObjectRef'). So we destructure it here.

angelika edited the summary of this revision. (Show Details)
tomek added inline comments.
native/components/full-screen-view-modal.react.js
887 ↗(On Diff #47090)

Nit

This revision is now accepted and ready to land.Feb 17 2025, 4:18 AM
native/components/full-screen-view-modal.react.js
895–902 ↗(On Diff #47090)

Nit

904–922 ↗(On Diff #47090)

Could probably be simplified to avoid the return keyboard here too, but it's more subjective

angelika added inline comments.
native/components/full-screen-view-modal.react.js
904–922 ↗(On Diff #47090)

I prefer the version with return. It's longer but imho more readable.

This revision was landed with ongoing or failed builds.Feb 25 2025, 2:48 AM
This revision was automatically updated to reflect the committed changes.