HomePhabricator
Diffusion Comm 6dd7538807f7

[lib] Introduce a canBeRenderedOnItsOwn boolean to message specs

Description

[lib] Introduce a canBeRenderedOnItsOwn boolean to message specs

Summary:
Now that I've introduced flags for determining sidebar sources / pin sources, the last two steps for ENG-4849 are about refining existing code. Primarily message-fetchers.js code. Taking a look at rawMessageInfoForRowsAndRelatedMessages, we filter out SIDEBAR_SOURCE, TOGGLE_PIN, REACTION and EDIT_MESSAGE. To make this cleaner, we can simplify this since search results will only show TEXT messages, and it's not possible to pin SIDEBAR_SOURCE or TOGGLE_PIN. This new flag, canBeRenderedOnItsOwn, will be set for REACTION and EDIT_MESSAGE, and we'll now check the message specs in the next diff to clean up this code.

Resolves https://linear.app/comm/issue/ENG-5216/introduce-a-canberenderedonitsown-boolean-to-message-specs

Depends on D9445

Test Plan: Updated unit tests, ran yarn workspace lib test, and verified that nothing crashes after introducing a new flag to the message specs

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: ashoat, tomek, wyilio

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

Details

Provenance
rohanAuthored on Oct 17 2023, 4:31 PM
Reviewer
atul
Differential Revision
D9536: [lib] Introduce a canBeRenderedOnItsOwn boolean to message specs
Parents
rCOMMffb42e25ff75: [lib/web/native] Introduce isInvalidPinSource method that checks theā€¦
Branches
Unknown
Tags
Unknown