Alert user when no users were added to group/project.
requested to merge yesbabyyes/gitlab-ce:22967-adding-zero-users-to-group-reports-success into master
What does this MR do?
Show an alert to the user when no users were selected for adding to a group/project.
Are there points in the code the reviewer needs to double check?
I had to do some trickery with user/member in the tests, I mimicked the style from the same file with find_by_id etc.
Also, I made a small change to window.disableButtonIfEmptyField
, which shouldn't affect other code but is worth an extra look.
Why was this MR needed?
There was an inconsistent, confusing UI when signalling the adding of users to a group/project. It is mitigated by improving the feedback to make it more consistent and similar in groups and projects, as well as alleviating the need for later feedback by disabling the submit button unless users are added. Also, there were gaps in the test coverage which this MR improves.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #22967 (closed) and #23270 (closed).