Page MenuHomePhabricator

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

Authored by atul on May 6 2024, 12:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 5:30 PM
Unknown Object (File)
Thu, Nov 21, 2:21 AM
Unknown Object (File)
Thu, Nov 21, 2:21 AM
Unknown Object (File)
Sun, Nov 10, 11:41 AM
Unknown Object (File)
Sun, Nov 10, 11:41 AM
Unknown Object (File)
Fri, Nov 8, 7:17 PM
Unknown Object (File)
Tue, Nov 5, 4:07 PM
Unknown Object (File)
Tue, Nov 5, 3:53 PM
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.May 6 2024, 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.May 6 2024, 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