Page MenuHomePhabricator

[web] Introduce "Add Members" button in `MembersModal`
ClosedPublic

Authored by jacek on Apr 15 2022, 4:45 AM.
Tags
None
Referenced Files
F3358532: D3745.diff
Sun, Nov 24, 5:24 AM
Unknown Object (File)
Fri, Nov 22, 12:40 PM
Unknown Object (File)
Wed, Nov 13, 1:11 AM
Unknown Object (File)
Tue, Nov 12, 3:43 PM
Unknown Object (File)
Sat, Nov 9, 10:47 PM
Unknown Object (File)
Sun, Nov 3, 2:50 PM
Unknown Object (File)
Sun, Oct 27, 10:10 PM
Unknown Object (File)
Oct 23 2024, 6:43 AM

Details

Summary

Introduce button in Members modal launching "AddMembrsModal". The button is displayed if user has "ADD_MEMBERS" permission.

Screenshot_Google Chrome_2022-04-15_140135.png (809×482 px, 30 KB)

Test Plan

Launch members modal from thread action menu in some community thread. The button should be displayed and launching "AddMembersModal"

Diff Detail

Repository
rCOMM Comm
Branch
jacek/add-members
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul added inline comments.
web/modals/threads/members/members-modal.react.js
89–92 ↗(On Diff #11515)

Wonder if it would be cleaner to pull this outside of the React.useMemo?

This revision is now accepted and ready to land.Apr 15 2022, 10:45 AM
web/modals/threads/members/members-modal.react.js
89–92 ↗(On Diff #11515)

I missed this comment, sorry.
I'm not sure if it would be cleaner, but we agreed with Tomek, that it could improve performance a bit - the memo wouldn't depend on the whole threadInfo.
I'll move it outside.

Move canAddMembers outside the useMemo.