Skip to content

Refactor approvals module - sort files

What does this MR do and why?

This is the first MR in the series of 4 that tackles the refactor of approvals module.

Planned steps Status
Reduce the number of unsorted files in ee/app/assets/javascripts/approvals/components
Move shared rule_input.vue component 🔴
Rename directories and files to better reflect their scope 🔴
Separate mounting modules from components 🔴

I moved components into sub-directories to group and reduce the number of single files in components folder. For rule_modal sub-directory I opted for renaming the components as well, to better show their purpose. I did not do that others, since we have a rule that doesn't allow one-letter component names. I'll be renaming some of the things in step 3 and will try to come up with something meaningful then.

I recommend reviewing this MR commit by commit. Each commit is a different sub-directory.

The exact breakdown of the sub-directories as agreed in the issue (including already existing sub-directories):

ee/app/assets/javascripts/approvals/components
|_ group_settings
|_ license_compliance
|_ mr_edit
|_ project_settings
|_ security_configuration
|_ security_orchestration
|_ mr_widget_approval_check
  |_ approval_check_popover.vue
  |_ approval_check_rule_popover.vue
|_ approval_settings
  |_ approval_settings.vue
  |_ approval_settings_radio.vue
  |_ approval_settings_locked_icon.vue
  |_ approval_settings_checkbox.vue
|_ approvers
  |_ approvers_list_empty.vue
  |_ approvers_list_item.vue
  |_ approvers_list.vue
  |_ approvers_select.vue
|_ rules
  |_ rules.vue
  |_ rule_name.vue
  |_ rule_form.vue
  |_ rule_controls.vue
  |_ rule_branches.vue
  |_ empty_rule.vue
  |_ empty_rule_name.vue
|_ modal_rule
  |_ modal_rule_create.vue
  |_ modal_rule_remove.vue

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

There are no user facing changes, since it's only moving components to sub-directories. Here's the recording with me checking the typical user path for the approvals:

Screen_Recording_2023-12-19_at_18.07.21

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Choose a project
  2. Go to Settings > Merge requests . Merge request approvals.
  3. Make sure there is no related console errors, when you check the flow of adding a new rule, editing and deleting it, as well as checking the lists below the table.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #435143 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports