Page MenuHomePhabricator

[Native] Fix uploading images transition
ClosedPublic

Authored by jakub on Aug 10 2022, 2:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 5:49 AM
Unknown Object (File)
Thu, Dec 26, 4:46 AM
Unknown Object (File)
Wed, Dec 25, 11:09 PM
Unknown Object (File)
Wed, Dec 25, 11:09 PM
Unknown Object (File)
Wed, Dec 25, 11:09 PM
Unknown Object (File)
Wed, Dec 25, 11:09 PM
Unknown Object (File)
Mon, Dec 16, 4:04 PM
Unknown Object (File)
Fri, Dec 6, 1:05 PM

Details

Summary

Context: here

Fix transition bug that occurred during uploading image on chats.

Test Plan

Tested the fix on Android and iOS, both virtual and physical device and it works correctly.

Diff Detail

Repository
rCOMM Comm
Branch
jakub/temporary
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 10 2022, 2:56 AM
Harbormaster failed remote builds in B11266: Diff 15503!
jakub edited the test plan for this revision. (Show Details)
jakub added reviewers: tomek, karol.

The ShellCheck CI build is failing because you did not rebase this diff on top of master when you submitted it for review. If you rebase this diff on top of the latest changes from the repository, that build should pass.

I think the iOS build will also fix if you rebase on top of master, but not sure.

Also just for good measure, when you do pull from master and rebase this diff, make sure you run the Test Plan again so you know everything still works, since technically you were running your changes in an old version of the repository.

And great job on figuring out this bug!!

Not feeling too good about reviewing this, sorry.

ashoat requested changes to this revision.Aug 10 2022, 8:11 AM

I'd love to understand why this component initially renders with !triggerReply && !triggerSidebar in the case of non-sidebars. (This is the question I was trying to ask on Linear.)

@jakub, before we accept this, can you "get to the bottom of this" and figure out what's going on there? Either way, the change in this diff probably makes sense... but it seems like there might be a "deeper issue" we need to resolve.

native/chat/swipeable-message.react.js
251 ↗(On Diff #15510)

Is there any way we can "disable" this component to reduce the performance impact of using it when we don't need it? Perhaps there is a property like enabled={false} or something. Can you check the docs?

252 ↗(On Diff #15510)

Why did we add transformMessageBoxStyle here?

This revision now requires changes to proceed.Aug 10 2022, 8:11 AM
jakub marked 2 inline comments as done.

Removing unnecessary style and disabling PanGestureHandler

ashoat added inline comments.
native/chat/swipeable-message.react.js
251 ↗(On Diff #15510)

It would've been helpful to link the docs after updating the diff. I initially wasn't sure if you just added the enabled={false} because I suggested it, versus actually researching the docs and figuring out what it should be. As a result, I ended up having to do the research myself, which wasn't a great use of my time.

It helps to respond explicitly to review comments that ask you to do X (eg. read the docs) with the steps you followed and any relevant links :)

This revision is now accepted and ready to land.Aug 12 2022, 9:55 AM
native/chat/swipeable-message.react.js
251 ↗(On Diff #15510)

We can disable handling gestures using enabled property as described here, but it doesn't follow clearly from docs that it could reduce performance impact.
However, disabling handlers doesn't influence to children components, so keeping it enabled is redundant.

252 ↗(On Diff #15510)

I think it's unnecessary and we could remove it