Add error handling to import project members modal
What does this MR do and why?
Add error handling to import project members modal for individual member failure reporting
- better error handling for user feedback
See discussion on design - https://gitlab.com/gitlab-org/gitlab/-/issues/405010#note_1464401487
Note screenshot wording a bit out of date due to !125761 (comment 1475430577)
Screenshots or screen recordings
scenario | Before | After |
---|---|---|
systemic failure | no change | |
partial member import failure |
How to set up and validate locally
note: taken from spec/features/projects/members/import_project_members_spec.rb
examples
Systemic failure
This one is hard to simulate as the UI kinda safeguards most of the failure paths from happening(projects/users existing) see simulation in the spec(that is how screenshots were taken)
Partial success/failure
- Create a project under a group that you will import members to - 'A'
- Create a project you will import members from - 'B'
- Add a user to the group for project A as an owner
- Add the same user to project B as a reporter
- On project A, navigate to the members page(example:
http://gdk.test:3000/test-import-project-modal/new-project/-/project_members
) - Click
Import from a project
. - Select project B and submit.
- Notice the errors.
Success
Follow the partial success/failure instructions and import a different project than 'B'
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #405010