Skip to content

Invite Group Modal - Use new API on project view

Zack Cuddy requested to merge 391591-new-group-picker-api into master

What does this MR do and why?

Closes #391591 (closed)

Currently when you invite a group to a project it calls the Groups API. This was an expensive call and was causing issues for some customers. A new API specifically for sharing groups to projects was created: !106119 (merged).

This change implements this in the invite group modal behind the prop isProject since the shared component is used in other spaces as well.

The idea here is: If isProject is true, use the new API, otherwise use the old one.

Screenshots or screen recordings

Before After
Before After

How to set up and validate locally

  1. Go to any Project
  2. In the sidebar navigate to Manage > Members
  3. Open dev tools and look at the Network Tab
  4. Click the Invite group button at the top right of the Members page
  5. Ensure request is sent to /projects/ID/share_location
  6. Ensure searching, adding, etc. works

Related to #391591 (closed)

Edited by Zack Cuddy

Merge request reports