Page MenuHomePhabricator

[native] make user profile accessible from MessageReactionsModal
ClosedPublic

Authored by ginsu on Oct 6 2023, 4:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 7:07 AM
Unknown Object (File)
Fri, Nov 1, 7:07 AM
Unknown Object (File)
Fri, Nov 1, 7:07 AM
Unknown Object (File)
Fri, Nov 1, 7:03 AM
Unknown Object (File)
Oct 2 2024, 10:28 AM
Unknown Object (File)
Oct 2 2024, 6:02 AM
Unknown Object (File)
Sep 20 2024, 6:15 AM
Unknown Object (File)
Sep 19 2024, 9:08 PM
Subscribers

Details

Summary

This diff makes the renderItem inside of MessageReactionsModal into a touchable that will navigate to the user profile whenever onPress is triggered

Depends on D9389

Test Plan

Please see the demo video below:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/chat/message-reactions-modal.react.js
51–58 ↗(On Diff #31737)

I created this useEffect that will call the navigateToUserProfileBottomSheet callback whenever the MessageReactionsModal is unmounting and there is a selectedUserID. This will make sure that the user profile bottom sheet slides in only after the MessageReactionsModal has finished sliding out.

ginsu requested review of this revision.Oct 6 2023, 4:45 AM
atul added inline comments.
native/chat/message-reactions-modal.react.js
51–58 ↗(On Diff #31737)

Hm, it seems like a clever solution but isn't super intuitive without this annotation.... at a minimum could you add a comment above the useEffect explaining what's going on?

I'm guessing you discussed with eg Ted that we don't want the UserProfileBottomSheet appearing over the reactions modal?


Just brainstorming...

Could we have some bottomSheetPresented state "above" this component that gets set/unset as part of the useEffect? Could be consumed in a separate useEffect to navigateToUserProfileBottomSheet?

Similar to ModalProvider on web could we have some higher level abstraction that handles "stacks" of BottomSheets? Might be overkill but may allow for simpler API

This revision is now accepted and ready to land.Oct 9 2023, 1:19 PM
native/chat/message-reactions-modal.react.js
51–58 ↗(On Diff #31737)

Might be overkill but may allow for simpler API (eg presentSheet(...)) that handles fading in/out/etc

native/chat/message-reactions-modal.react.js
51–58 ↗(On Diff #31737)

Hm, it seems like a clever solution but isn't super intuitive without this annotation.... at a minimum could you add a comment above the useEffect explaining what's going on?

Yea definitely

> I'm guessing you discussed with eg Ted that we don't want the UserProfileBottomSheet appearing over the reactions modal?

Here is what is on the Figma

Screenshot 2023-10-11 at 4.38.48 AM.png (1×1 px, 312 KB)

Might be overkill but may allow for simpler API (eg presentSheet(...)) that handles fading in/out/etc

Agree that this API could be improved. Will create a Linear task to track for the time being

address comments + rebase before landing