Page MenuHomePhabricator

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

Authored by atul on Apr 23 2024, 12:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 6:02 PM
Unknown Object (File)
Tue, Nov 26, 4:23 PM
Unknown Object (File)
Nov 19 2024, 11:37 PM
Unknown Object (File)
Oct 26 2024, 1:01 AM
Unknown Object (File)
Oct 12 2024, 4:53 PM
Unknown Object (File)
Oct 12 2024, 4:52 PM
Unknown Object (File)
Oct 12 2024, 4:52 PM
Unknown Object (File)
Oct 12 2024, 4:52 PM
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
Lint Not Applicable
Unit
Tests Not Applicable

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.Apr 23 2024, 1:07 PM
This revision is now accepted and ready to land.Apr 24 2024, 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