Fix merge request approvals accordion
requested to merge 336698-migrate-gitlab-ui-checkbox-to-gitlab_ui_checkbox_component-in-ee-app-views-admin-push_rules into master
📖 What does this MR do?
The original intent of this MR was to take care of #336698 (closed) and change the Merge request approvals
checkboxes to use the GitLab UI form builder. While I was doing this I realized that the accordions didn't work correctly. The Merge request approvals
accordion was always open and wouldn't close. Also when you saved a setting in the Push rules
accordion it is closed after the reload of the page. So this MR fixes the issue with the accordions and changes the Merge request approvals
checkboxes to use the GitLab UI form builder
📷 Screenshots
Before | After |
---|---|
Screen_Recording_2021-09-03_at_8.55.53_AM | Screen_Recording_2021-09-03_at_8.56.30_AM |
💻 How to setup and validate locally
- Sign in as an admin (
root
on GDK) - Navigate to
/admin/push_rule
🚦 Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) - [-] I have added/updated documentation, or it's not needed. (Is documentation required?)
-
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) - [-] I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?)
-
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
- [-] I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.)
- I am not sure if the accordion functionality warrants a system/feature spec since they are quite expensive. The JavaScript responsible for the accordions is tested in spec/frontend/settings_panels_spec.js so we would really just be checking for the correct classes in a system/feature spec.
-
I have tested this MR in all supported browsers, or it's not needed. - [-] I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Edited by Peter Hegman