Page MenuHomePhabricator

[native] Added animation to the highlight of edited message
ClosedPublic

Authored by kuba on May 11 2023, 2:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 15, 5:52 PM
Unknown Object (File)
Tue, May 14, 2:20 AM
Unknown Object (File)
Thu, May 9, 1:25 PM
Unknown Object (File)
Tue, May 7, 5:36 AM
Unknown Object (File)
Sun, May 5, 11:58 AM
Unknown Object (File)
Mon, Apr 22, 11:48 AM
Unknown Object (File)
Mon, Apr 22, 11:48 AM
Unknown Object (File)
Mon, Apr 22, 11:48 AM
Subscribers

Details

Summary

Added appearning and disappearing animation to the highlight of the edited message.

Test Plan

Run the app. Check the animations.

Video:
Available in previous diff: https://phab.comm.dev/D7790

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat requested changes to this revision.May 12 2023, 2:18 AM
ashoat added inline comments.
native/chat/composed-message.react.js
219 ↗(On Diff #26367)

Have you noticed we don't use Animated.View directly? I think you should be using AnimatedView

This revision now requires changes to proceed.May 12 2023, 2:18 AM
native/chat/composed-message.react.js
219 ↗(On Diff #26367)

I believe that we use Animated.View in several places, where we animate element styles, like here. I.g. in logged-out-modal.react.js, image-modal.react.js.

Simply changing it generates type error:

Cannot create AnimatedView element because null or undefined [1] is incompatible with read-only array type [2] in property transform of array element of property style.

Should I have a look at it?

native/chat/composed-message.react.js
63 ↗(On Diff #26367)

All React prop types should be read-only

219 ↗(On Diff #26367)

It's not immediately clear to me why you're seeing that error. Simply seeing the error isn't enough of an investigation – I'm curious to hear what you've tried, and what your investigation yielded. Please try investigating and share more details

In particular, I'm curious what [1] is... I don't see you setting transform to null or undefined for any of these types, but I may be missing something

I believe that we use Animated.View in several places, where we animate element styles, like here. I.g. in logged-out-modal.react.js, image-modal.react.js.

I'm not sure why this is... but AnimatedView must exist for a reason. If we think it does not need to exist, we could consider deprecating it. But while it exists, we should probably be using it

kuba marked an inline comment as done.
kuba edited the summary of this revision. (Show Details)

Fixed types, changed to AnimatedView instead of Animated.View

ashoat added inline comments.
native/chat/composed-message.react.js
97 ↗(On Diff #26498)

Can we remove this newline?

This revision is now accepted and ready to land.May 16 2023, 5:56 AM