Redesign create custom role permissions list
What does this MR do and why?
On the Settings
-> Roles and Permissions
page, there's a form for creating new roles:
![]() |
There is a list of permissions in the form. This MR changes the design of the permissions list.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Go to any top-level group, then go to
Settings
->Roles and Permissions
. - Click the
New role
button on the upper right. - Verify that the permissions uses the new design as in the above screenshot.
- Do not fill out the form or select any permissions. Click on the
Create role
button at the bottom of the form. - Verify that the permission names turn red.
- Select at least 1 permission, then click on
Create role
again. Verify that the permission names turn back to black. - Select
Admin vulnerability
and verify thatRead vulnerability
is checked alongside it. - Unselect
Read vulnerability
and verify thatAdmin vulnerability
is unchecked alongside it.
Related to #438838 (closed)
Merge request reports
Activity
changed milestone to %16.11
assigned to @dftian
- A deleted user
added frontend label
4 Warnings 65b16530: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. a80af2fe: The commit subject must contain at least 3 words. For more information, take a look at our Commit message guidelines. featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
This merge request contains lines with testid selectors. Please ensure e2e:package-and-test
job is run.testid
selectorsThe following changed lines in this MR contain
testid
selectors:ee/app/assets/javascripts/roles_and_permissions/components/permissions_selector.vue
- :data-testid="permission.value" + data-testid="permissions-selected-message"
If the
e2e:package-and-test
job in theqa
stage has run automatically, please ensure the tests are passing. If the job has not run, please start themanual:e2e-test-pipeline-generate
job in theprepare
stage and ensure the tests infollow-up:e2e:package-and-test-ee
pipeline are passing.For the list of known failures please refer to the latest pipeline triage issue.
If your changes are under a feature flag, please check our Testing with feature flags documentation for instructions.
Reviewer roulette
Category Reviewer Maintainer frontend @andrei.zubov
(UTC+2, 12 hours ahead of author)
@sdejonge
(UTC+10, 20 hours ahead of author)
test for spec/features/*
@hmuralidhar
(UTC+10, 20 hours ahead of author)
Maintainer review is optional for test for spec/features/*
Please check reviewer's status!
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by Ghost Useradded 448 commits
-
d867c2cc...2f8072fd - 446 commits from branch
438838-refactor-custom-role-permissions
- 7db41025 - Redesign create custom role permissions list
- 26b5dd5c - Add tests
-
d867c2cc...2f8072fd - 446 commits from branch
- Resolved by Andrew Fontaine
- Resolved by Andrew Fontaine
- Resolved by Andrew Fontaine
- Resolved by Andrew Fontaine
- Resolved by Andrew Fontaine
- Resolved by Andrew Fontaine
@ipelaez1 Would you be able to do the UX review for this one?
Several things to note:- In the design, the table header does not have a top border and has a background color, but the table's default look has a top border and no background color. I opted for the table default:
Design Implementation -
In the design, the label text is
Custom Permissions
, but elsewhere we lowercase the second word (i.e.Base role
instead ofBase Role
, so in the implementation I made itCustom permissions
. -
I changed the description text to
Learn more about available custom permissions.
, but a link wasn't provided, so I linked it to https://docs.gitlab.com/ee/user/custom_roles/abilities.html. -
In the design, the selection text is
1 of 18 permissions added
, but we're selecting items instead of creating new ones, so I changed it to1 of 18 permission selected
. -
The permission name is not allowed to line wrap, whereas the description is. Otherwise it's a bit difficult to read the permission name:
With line wrap Without - For the loading state, I changed it from a skeleton loader to showing the table as busy with loading icon:
Before After - For the error state, the design is still TBD, so I made the text red like how it was previously:
- In the screenshots, the checkbox column has the header
Checkbox
. I didn't notice it until after I already took all the screenshots, so rather than re-take all the screenshots, here's one of what it looks like now:
Edited by Daniel Tian