HomePhabricator
Diffusion Comm 8a41660f6b46

[web] Create a community roles modal to display all roles and member counts

Description

[web] Create a community roles modal to display all roles and member counts

Summary:
For a community when the "Roles" option is clicked in the community actions menu, we want to display a modal that lists each of the member counts and role names for that given community. The logic is similar to what was done on native in D8359.

Something to note about the reduxThreadInfo line of code is that it's used so after creating a role, then returning back to this modal, we want to pull in the latest ThreadInfo from the redux store so the modal can show the newly created role in the list of roles. Without this (as was a similar case in native), the new role will only show once the modal is closed and re-opened, since the props have not changed. The effect of this can be seen later in the stack in D8595, where after creating a new role it appears in the community roles modal.

Additional note: any common / shared logic between web and native are tracked to be extracted to a shared utils file in https://linear.app/comm/issue/ENG-4443/[follow-up]-extract-shared-logic-between-web-and-native-to-utils to not delay this goal.

ENG-4426

Depends on D8592

Test Plan:
Checked that the community roles modal showed the correct role names and member counts for a given community

Reviewers: atul, ginsu, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek, ted

Differential Revision: https://phab.comm.dev/D8593

Details

Provenance
rohanAuthored on Jul 20 2023, 11:21 AM
Reviewer
ashoat
Differential Revision
D8593: [web] Create a community roles modal to display all roles and member counts
Parents
rCOMMe60afab16ca6: [web] Display a Roles option in the community menu
Branches
Unknown
Tags
Unknown