Page MenuHomePhabricator

[native] Show a pin icon next to pinned messages
ClosedPublic

Authored by rohan on May 8 2023, 6:52 AM.
Tags
None
Referenced Files
F3241608: D7742.id26201.diff
Wed, Nov 13, 7:32 PM
F3241542: D7742.id26229.diff
Wed, Nov 13, 7:09 PM
Unknown Object (File)
Mon, Oct 28, 6:39 AM
Unknown Object (File)
Wed, Oct 23, 3:38 PM
Unknown Object (File)
Oct 2 2024, 9:24 AM
Unknown Object (File)
Sep 28 2024, 8:02 AM
Unknown Object (File)
Sep 28 2024, 8:02 AM
Unknown Object (File)
Sep 28 2024, 8:02 AM
Subscribers

Details

Summary

Next to each pinned message, we want to display a pin icon to indicate that the message is pinned. We only want to show this icon in chat, and not the pin modal / pinned messages screen.

Logic is pretty much identical to https://phab.comm.dev/D7505

Depends on D7735

Linear: https://linear.app/comm/issue/ENG-3455/show-a-pin-icon-next-to-pinned-messages

Test Plan

Test to confirm that the pin indicator appears in chat and not the other instances where Message is rendered (like the pin modal and screen).

For iOS, the confirmation is that there are no message height inconsistencies in the terminal. For Android, they appear on master, but the message height warnings don't show for all of the pinned messages so it makes me believe no changes made in this diff cause the warnings.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan requested review of this revision.May 8 2023, 7:11 AM
atul requested changes to this revision.May 8 2023, 9:24 AM
atul added inline comments.
native/chat/composed-message.react.js
167 ↗(On Diff #26201)

Can we memoize? Can probably put all of pinIcon in a useMemo?

This revision now requires changes to proceed.May 8 2023, 9:24 AM

Disregard... it's a class component. My bad.

This revision is now accepted and ready to land.May 8 2023, 9:29 AM