Page MenuHomePhabricator

[lib] Introduce `useAvailableThreadMemberActions` and consume in `web/Member`
ClosedPublic

Authored by atul on Mon, May 6, 12:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 23, 6:52 PM
Unknown Object (File)
Thu, May 23, 1:48 PM
Unknown Object (File)
Thu, May 23, 3:39 AM
Unknown Object (File)
Sat, May 18, 8:13 AM
Unknown Object (File)
Fri, May 17, 9:08 PM
Unknown Object (File)
Fri, May 17, 2:58 PM
F1756564: b6778a.png
Tue, May 14, 10:32 AM
F1756563: d3e5af.png
Tue, May 14, 10:32 AM
Subscribers
None

Details

Summary

Similar to getAvailableThreadMemberActions but consumes useThreadHasPermission instead of threadHasPermission.

Also consume hook in web/Member to show usage.

Test Plan

flow + close reading for now

Logged return value of getAvailableThreadMemberActions before and useAvailableThreadMemberActions after to ensure that they remained the same.

Before:

d3e5af.png (406×480 px, 40 KB)

After:

b6778a.png (300×780 px, 34 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Mon, May 6, 12:52 PM

Will getAvailableThreadMemberActions be deprecated at the end of this stack? If not, I think it would be good to factor out the logic instead of copy-pasting

lib/shared/thread-utils.js
1696 ↗(On Diff #39871)

Nit

This revision is now accepted and ready to land.Mon, May 6, 1:02 PM

rebase before addressing feedback

atul edited the test plan for this revision. (Show Details)

Will getAvailableThreadMemberActions be deprecated at the end of this stack? If not, I think it would be good to factor out the logic instead of copy-pasting

Gets deleted in D11914