Modify UX for dependency proxy project settings form
What does this MR do and why?
Follow-up to Adds support for updating maven dependency prox... (!139535 - merged) based on discussion.
Refactor the way dependency proxy form is updated on the frontend based on 1.) of above mentioned discussion
- Allow updating toggle & maven fields using a single form.
- Remove apollo cache update related code required for immediate update of toggle. This was added in Calls mutation when dependency proxy packages s... (!139379 - merged)
- Adds feature tests which should pass when bug fix dependency is merged.
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.
Screenshots or screen recordings
before | after |
---|---|
Screen_Recording_2023-12-13_at_1.08.31_am | Screen_Recording_2024-01-02_at_10.47.15_pm |
How to set up and validate locally
The dependency proxy for packages has a few requirements:
-
have
packages
->enabled
set totrue
ingitlab.yml
. -
have
dependency_proxy
->enabled
set totrue
ingitlab.yml
. -
have the
packages
feature enabled in the project's settings.Settings
->General
->Visiblity, project features, permissions
->Package registry
(checkbox enabled.) -
have a GitLab license.
Premium
or more. -
have the related feature flag turned on:
Feature.enable(:packages_dependency_proxy_maven)
-
Visit Project > Settings > Packages and Registries
-
Under the Dependency Proxy settings block, try updating the form
-
Ensure the following:
- Toggle gets updated immediately
- Submit button is visible & gets disabled when submitting.
- Submitting the form shows a toast when successful.
- Submitting the form shows an alert with correct error message when request fails.
Feature test, should pass when bug fix is merged
bundle exec rspec ee/spec/features/projects/settings/packages_spec.rb
Related to #410726 (closed)