Page MenuHomePhabricator

[web] Replace `threadHasPermission` with `useThreadHasPermission` in `EditThreadAvatar`
ClosedPublic

Authored by atul on Tue, Apr 23, 12:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 5:40 PM
Unknown Object (File)
Thu, May 2, 8:34 AM
Unknown Object (File)
Thu, May 2, 12:20 AM
Unknown Object (File)
Mon, Apr 29, 2:26 PM
Unknown Object (File)
Mon, Apr 29, 11:58 AM
Unknown Object (File)
Mon, Apr 29, 9:40 AM
Unknown Object (File)
Sun, Apr 28, 10:40 AM
Unknown Object (File)
Sat, Apr 27, 9:46 AM
Subscribers

Details

Summary

Followup to D11746 where we're updating client to use hook.


Depends on D11746

Test Plan

flow/CI/etc.

Thread where I shouldn't have EDIT_THREAD_AVATAR permission doesn't let me change avatar:

c1cee6.png (414×472 px, 60 KB)

Thread where I should have EDIT_THREAD_AVATAR permission DOES let me change avatar:

8426a2.png (660×1 px, 78 KB)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

I was going to do one big diff that updated everything in web, then native, etc... but there are some slight additional changes being made to these components (changing of Prop types, dep lists, etc) so figured it might be safe to break each into a separate diff even if it's spammy? Can change approach if preferred, but going off feedback from https://phab.comm.dev/D9907

atul requested review of this revision.Tue, Apr 23, 1:07 PM
This revision is now accepted and ready to land.Wed, Apr 24, 4:39 AM

I think you should consider having a test plan that actually verifies that this logic is correct.

I think you should consider having a test plan that actually verifies that this logic is correct.

Added Test Plan for this diff and did some console logging as sanity check for subsequent diffs, but think it's unnecessary to do a full blown Test Plan for diffs in this stack since changes are pretty straightforward