Page MenuHomePhabricator

[lib] Update signatures in `thread-utils` to handle `MinimallyEncodedThreadInfo`
ClosedPublic

Authored by atul on Nov 13 2023, 2:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 9:18 AM
Unknown Object (File)
Mon, Dec 2, 11:09 AM
Unknown Object (File)
Sun, Dec 1, 1:22 AM
Unknown Object (File)
Sat, Nov 30, 12:47 PM
Unknown Object (File)
Sun, Nov 24, 10:25 PM
Unknown Object (File)
Nov 16 2024, 8:43 PM
Unknown Object (File)
Nov 16 2024, 8:43 PM
Unknown Object (File)
Nov 16 2024, 8:43 PM
Subscribers
None

Details

Summary

Similar to D9811, we're updating utilities in thread-utils to handle MinimallyEncodedThreadInfo where the change is as simple as updating fn signature.

Will now go through and handle the ones that require more refactoring/branching/etc. Specifically:

  • threadUIName
  • checkIfDefaultMembers
  • patchThreadInfoToIncludeMentionedMembersOfParent
  • useRoleUserSurfacedPermissions

Depends on D9846

Test Plan

Entirely flow for now.

Diff Detail

Repository
rCOMM Comm
Branch
arcpatch-D9847 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

lib/types/thread-types.js
51–55 ↗(On Diff #33150)

Spreading MemberInfo causes fields to being "writeable."

This became an issue because I wrapped type definition of MinimallyEncodedRelativeMemberInfo in $ReadOnly<> which caused some flow issues.

I figure this is more "correct" anyways given we prefer read-only where possible?

atul published this revision for review.Nov 13 2023, 2:15 PM
This revision is now accepted and ready to land.Nov 13 2023, 2:31 PM
This revision was landed with ongoing or failed builds.Nov 13 2023, 3:02 PM
This revision was automatically updated to reflect the committed changes.