HomePhabricator
Diffusion Comm b54c1b07a7a3

[web] Display a pin icon next to pinned messages in chat

Description

[web] Display a pin icon next to pinned messages in chat

Summary:
Next to each pinned message, we want to display a pin icon in the color of the thread. To do this, one main change that was made is we need to determine whether the ComposedMessage (Message -> TextMessage or MultimediaMessage -> ComposedMessage) is rendered within a modal, or just in chat. This is because we consider two scenarios:

  1. The message is displayed in the toggle pin modal or the thread pinned messages modal - here, we want to avoid displaying the pin icon next to messages
  1. The message is rendered in the chat view, and there we want to display the pin icon next to messages.

As opposed to using a Context, I figured that that propagating the props through the three components in the rendering hierarchy would be the most efficient, so that's what this diff does.

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

Depends on D7382

Test Plan:
Test video will be attached to demonstrate that the icon is not shown in modals, and the icon is correctly positioned / colored.

Reviewers: ginsu, tomek, atul

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D7505

Details

Provenance
RohanK6 <rohan.khanderia@gmail.com>Authored on Apr 25 2023, 3:55 AM
rohanCommitted on Apr 25 2023, 6:00 PM
Reviewer
tomek
Differential Revision
D7505: [web] Display a pin icon next to pinned messages in chat
Parents
rCOMM03eb9bbf2bcf: [web] Allow interaction with inline engagement from the thread pinned messages…
Branches
Unknown
Tags
Unknown