Page MenuHomePhabricator

[native] introduce reactions to inline sidebar
ClosedPublic

Authored by ginsu on Dec 5 2022, 5:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 9, 12:35 AM
Unknown Object (File)
Tue, Apr 9, 12:35 AM
Unknown Object (File)
Tue, Apr 9, 12:35 AM
Unknown Object (File)
Tue, Apr 9, 12:35 AM
Unknown Object (File)
Tue, Apr 9, 12:35 AM
Unknown Object (File)
Tue, Apr 9, 12:35 AM
Unknown Object (File)
Tue, Apr 9, 12:35 AM
Unknown Object (File)
Tue, Apr 9, 12:35 AM
Subscribers

Details

Summary

introduce reactions to inline sidebar. Right now, going with a temporary solution of just showing the number of likes right now, but in a subsequent diff will be extending this to show more information about the reaction message


Depends on D5878

Linear Task: ENG-2408

Test Plan

Please watch the demo video below to see how messages with reactions look like

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu requested review of this revision.Dec 5 2022, 5:35 PM
ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: atul, rohan, tomek.
ginsu edited the test plan for this revision. (Show Details)

add space between reaction and number

native/chat/composed-message.react.js
149 ↗(On Diff #19156)

At some point we should rename this to InlineEngagement to better reflect that it includes reactions

tomek requested changes to this revision.Dec 6 2022, 7:01 AM
tomek added inline comments.
native/chat/composed-message.react.js
149 ↗(On Diff #19156)

It seems like we had a component named like that e.g. D4115 but the diffs were abandoned for some reason.

native/chat/inline-sidebar.react.js
45 ↗(On Diff #19156)

If additions and removals of reaction sum up to zero we shouldn't show them.

50 ↗(On Diff #19156)

I don't think we can simply take a length when we allow removing a reaction.

This revision now requires changes to proceed.Dec 6 2022, 7:01 AM

Could you share a screenshot with a case where multiple people liked a message?

native/chat/inline-sidebar.react.js
29 ↗(On Diff #19299)

$ReadOnlyMap

51 ↗(On Diff #19299)

For multiple reactions we would probably need to sort it in a way that is consistent between different messages. But we can worry about it later.

55–57 ↗(On Diff #19299)

It looks ok for one reaction, but we don't separate multiple reactions with spaces.

In D5813#175174, @tomek wrote:

Could you share a screenshot with a case where multiple people liked a message?

atul requested changes to this revision.Dec 15 2022, 9:42 AM

Let's pull out the logic in reactionList to a helper function (probably in lib since I think this logic will also be needed on web?)

native/chat/inline-sidebar.react.js
50–64 ↗(On Diff #19336)

Can we pull this logic out into a helper function?

Presumably we're going to need the same function on web, can we move this to lib.

This revision now requires changes to proceed.Dec 15 2022, 9:42 AM

fogot to hit save on editor

This revision is now accepted and ready to land.Dec 18 2022, 9:11 PM