HomePhabricator
Diffusion Comm 117eef980510

[lib] Introduce entity-helpers.js to help resolve ThreadInfo into…

Description

[lib] Introduce entity-helpers.js to help resolve ThreadInfo into ResolvedThreadInfo

Summary:
In a following diff, I'll update ThreadInfo.uiName to be string | $ReadOnlyArray<UserEntity>. At that point, this new ResolvedThreadInfo type will be differentiated from ThreadInfo. But at this this point, it is a straight copy-paste.

This diff introduces helpful utilities for resolving ThreadInfo into ResolvedThreadInfo, and a first use case, which is in calendar-selectors.js.

This diff has to come before I change the types, otherwise Flow would report errors.

Depends on D6590

Test Plan:
Here is FilterPanel, which is now able to resolve ENS names:

Screenshot 2023-02-04 at 9.46.35 PM.png (594×622 px, 35 KB)

Reviewers: atul, inka

Reviewed By: atul

Subscribers: tomek

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

Details