Group visibility levels: Popover for disallowed radio buttons
-
Please check this box if this contribution uses AI-generated content as outlined in the GitLab DCO & CLA
What does this MR do and why?
As explained here, we noticed that the visibility level radio buttons might be wrongly checked when visibility level are restricted. This might be misleading and confusing for non-admin users.
This MR proposes to show all visibility level (radio buttons) and disable them when the visibility level is not allowed. Additionally we propose the usage of a popover to let the non-admin user know why the visibility level is disallowed.
Changelog: fixed
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
MR Checklist (@gerardo-navarro)
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
Screenshots or screen recordings
Scenario 1
- Restricted visibility level:
Public
- Visibility level of current group (that is edited in the screenshot):
Public
- Visibility level of child project:
Private
. - Explanation: When editing the group, the radio button for the visibility level
public
is disabled, but it is also checked (selected) as the group has currently the visibility levelpublic
(before the group is edited). The visiblity levelsprivate
andinternal
are visible and selectable.
Before | After |
---|---|
Scenario 2
- Restricted visibility level:
Public
- Visibility level of current group (that is edited in the screenshot):
Public
- Visibility level of child project:
Internal
. - Explanation: Same as in Scenario 1. The visiblity level
private
is not visible (and selectable) because the child project has the visibility levelinternal
and a parent group cannot have lower visibility level than the child project.
Before | After |
---|---|
Scenario 3
- Restricted visibility level:
Public
- Visibility level of current group (that is edited in the screenshot):
Public
- Visibility level of child project:
Public
. - Explanation: Same as in Scenario 1. Now the visibility level
internal
is not selectable as explained in Scenario 2.
Before | After |
---|---|
Scenario 4 (More restricted visibility levels)
- Restricted visibility level:
Public
andPrivate
- Visibility level of current group (that is edited in the screenshot):
Public
- Visibility level of child project:
Private
. - Explanation: Same as in Scenario 1. But, the visibility level
Private
is disabled and not selectable because it is restricted.
Before | After |
---|---|
Scenario 5 (More restricted visibility levels)
- Restricted visibility level:
Public
andPrivate
- Visibility level of current group (that is edited in the screenshot):
Public
- Visibility level of child project:
Internal
. - Explanation: Same as in Scenario 1 and Scenario 2.
Before | After |
---|---|
Scenario 6 (Restricted because of parent group)
- Restricted visibility level:
Public
- Visibility level of current group (that is edited in the screenshot):
Public
- Visibility level of parent group:
Internal
. - Explanation: Same as in Scenario 1. But, the visibility level
Private
is disabled and not selectable because it is restricted. The visibility levelPublic
is also disabled because it is restricted and the parent group has the visibility levelinternal
, see popover in screenshot.
Before | After |
---|---|
Scenario 7 (Restricted because of parent group)
- Restricted visibility level: None
- Visibility level of current group (that is edited in the screenshot):
Internal
- Visibility level of parent group:
Internal
. - Explanation: Same as in Scenario 6. The visibility level
Public
is also disabled because the parent group has the visibility levelinternal
, see popover in screenshot.
Before | After |
---|---|
Screenshot of old scenarios (DEPRECATED)
Scenario 1
The current group (that is edited in the screenshot) has the visibility level public
and a child project has the visibility level internal
. When editing the group, the radio button for the visibility level public
is disabled, but it is also checked (selected) as the group has currently the visibility level public
(before the group is edited). The visiblity level private
is also disabled because the child project has the visibility level internal
and a parent group cannot have lower visibility level than the child project.
Before | After |
---|---|
Scenario 2
The current group (edited in the screenshot) has the visibility level public
and a sub project has the visibility level private
. When editing the group than radio button for the visibility level public
is disabled, but it is checked (selected) as the group has currently the visibility level public
(before the group is edited).
When group has the visibility level public
and a sub project has the visibility level public
. The radio buttons for the visibility levels are allowed.
Without this MR (see screenshot in column "Before"), the visibility levels Public
and Private
would not be visible and the radio button for the visibility level Internal
is checked which is misleading, see #455668 (closed).
Before | After |
---|---|
Scenario 3
In this screenshot, we want to create a new group and the radio button for the visibility level public
is disabled because it is restricted by the admin.
Before | After |
---|---|
How to set up and validate locally
- Follow the steps described in the issue
- Change the visibility of child projects to reproduce the different scenarios described here
Ref #455668 (closed)