Draft: Use dynamic select dropdown on forks form
What does this MR do and why?
In order to select a namespace for a fork, this MR reuses the dropdown component from the project creation form.
Before
After
It performs a GraphQL request that returns a limited number of results. It will save us from 500 errors that happen due to the database timeout.
The backend code for fetching the groups is the same:
- For project creation: https://gitlab.com/gitlab-org/gitlab/blob/42f248c462740672749c73bf651d2054863ca96b/app/finders/groups/user_groups_finder.rb#L49
- For forks: https://gitlab.com/gitlab-org/gitlab/blob/42f248c462740672749c73bf651d2054863ca96b/app/finders/fork_targets_finder.rb#L13
So we can safely interchange the components.
If this MR gets merged, then we can cleanup the backend code as a follow-up.
Related issue: #290717 (closed)
Edited by Igor Drozdov