Use transformOrigin in chat screen avatar for animation #18467
Labels
chat
https://www.notion.so/Chattering-Eloquence-699ba4ab63494ac7a448ed580b5ac4ec
performance
tech-debt
Summary
required for #18409
We are animating the chat big avatar on the scroll of chat and changing its scale value as shown in video.
But currently, to keep its position fixed while scaling, we are using three parameters(
scale
,top
, andleft
), because transformation is happening from the center.But in version 0.73, react native added a new parameter
transformOrigin
which allows it to scale while keeping its left and top positions fixed. In this way, we will be able to remove the other 2 shared values.transformOrigin: https://reactnative.dev/docs/next/transforms#transform-origin
Current Code: https://github.com/status-im/status-mobile/blob/4eff9cc39cda0c33ca4a53ae9079d58345258d8f/src/status_im/contexts/chat/messenger/messages/list/view.cljs#L114C3-L114C3
Depends on: #18291
The text was updated successfully, but these errors were encountered: