HomePhabricator
Diffusion Comm bbbde5726431

[web] Create a 'create role' modal to allow users to make custom roles

Description

[web] Create a 'create role' modal to allow users to make custom roles

Summary:
This is the screen to allow users to create a custom role. For now, this is used just to create a new role, but later on in the web stack this screen should be able to be re-used for the editing roles flow. The logic of iterating through user-surfaced permissions is similar to what is done on native in D8391.

The on save functionality will come in the next diff. Also, the reason for making onCloseModal is because later in the stack, I will be pushing an UnsavedChangesModal if there are any changes made if a user tries to exit, so I just set it up now.

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-4427

Depends on D8593

Test Plan:
Walked through the create role flow with the new modal and confirmed everything worked (role name field, selecting permissions, clearing permissions, etc).

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: ashoat, tomek, ted

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

Details