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
F5255527: D14312.diff
Sun, Apr 6, 8:30 AM
Unknown Object (File)
Sat, Apr 5, 7:46 AM
Unknown Object (File)
Sat, Apr 5, 6:38 AM
Unknown Object (File)
Fri, Apr 4, 1:24 PM
Unknown Object (File)
Fri, Apr 4, 4:50 AM
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
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
No Lint Coverage
Unit
No Test Coverage

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

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

Nit

904–922

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

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.