HomePhabricator
Diffusion Comm 6f269a0c7bd9

[native] render user avatars in chat screen

Description

[native] render user avatars in chat screen

Summary:
Rendered user avatars in the chat screen. Avatars only render for users who are not the viewer and at the end of a message cluster. When the message gets swiped, the avatar will move with the message.

UPDATE: First draft of diff did not consider the width of chat bubbles being affected by the new avatar component. I changed the value of some composedMessageMaxWidth instances to consider avatarOffset


Depends on D7099

Linear Task: https://linear.app/comm/issue/ENG-3107/build-out-a-dummy-avatar-component-and-render-it-everywhere-we-will

Test Plan:
Please watch the demo videos to see all the cases I tested

multimedia message with multiple images:

video message:

Chat screen pre avatar world (when !shouldRenderAvatars)

Chat screen post avatar world (when shouldRenderAvatars)

Under the hood here are what these components look like:
Chat screen pre avatar world:

Screenshot 2023-03-23 at 12.44.26 PM.png (1×1 px, 1 MB)

Chat screen post avatar world:

Screenshot 2023-03-23 at 12.44.09 PM.png (1×1 px, 735 KB)

Super thin photo:
pre avatars world:

post avatars world:

Reviewers: ashoat, atul

Reviewed By: ashoat

Subscribers: ashoat, tomek, atul

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

Details

Provenance
ginsuAuthored on Mar 23 2023, 11:22 PM
Reviewer
ashoat
Differential Revision
D7067: [native] render user avatars in chat screen
Parents
rCOMM4765c224e781: [native] Use a JSON blob for heightMeasurerKey
Branches
Unknown
Tags
Unknown