Page MenuHomePhabricator

[native] Disable headerRight when the role name is empty
ClosedPublic

Authored by rohan on Jul 6 2023, 9:28 AM.
Tags
None
Referenced Files
F5337971: D8430.id.diff
Wed, Apr 9, 1:00 AM
F5335521: D8430.id28866.diff
Tue, Apr 8, 11:24 PM
F5334985: D8430.id29383.diff
Tue, Apr 8, 11:08 PM
F5334783: D8430.id29322.diff
Tue, Apr 8, 11:02 PM
F5334470: D8430.id28440.diff
Tue, Apr 8, 10:53 PM
F5332274: D8430.id28490.diff
Tue, Apr 8, 10:03 PM
Unknown Object (File)
Wed, Apr 2, 7:32 PM
Unknown Object (File)
Wed, Apr 2, 10:23 AM
Subscribers

Details

Summary

In an effort to prevent the user from reaching a state that would result in an error (and just a general better UX overall), we should disable the headerRight 'Create' button when the role name is empty. We should allow a user to create a role without any selected permissions because on the keyserver, we add a set of guaranteed permissions anyways, so we won't end up with a case of a role with no permissions.

Error handling for duplicate role names / etc will be done in a later diff.

Part of ENG-4178

Depends on D8428

Test Plan

Verified that the headerRight component is disabled when it should be, and enabled when the role name is non-empty.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

rohan requested review of this revision.Jul 6 2023, 9:45 AM
This revision is now accepted and ready to land.Jul 12 2023, 8:01 PM