Skip to content

Incremental refactoring of Static Site Editor controller and config

Chad Woolley requested to merge add-sse-config-file into master

What does this MR do?

This MR contains iterative refactoring and test improvements in preparation for adding the Static Site Editor config file as part of #241164 (closed).

This is Iteration 1 of a three-part iterative approach to implementing the Static Site Editor config file.

Config architecture refactoring:

The main change is introducind a decoupled/cohesive separation between the handling of configuration values which are generated versus those which will be read from the config file, as discussed and approved by the SSE team here:

Other refactoring and test improvements

  • Move logic from views/controllers to library classes. ("skinny controllers", "passive views")
  • Move behavior out of constructors into instance methods. For example, access to repository. This allows usage of preferred mocking approaches like instance_double and allow_next_instance_of
  • Naming consistency - make names of same values consistent across classes, and prefer to match what they are called when passed to the client:
    • payload -> data
    • file_path -> path

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Review App Static Site Editor Link

https://gitlab-review-add-sse-co-a627sr.gitlab-review.app/gitlab-instance-administrators-dfcd66ee/gitlab-self-monitoring/-/sse/master%2FREADME.md

Related Issues/Epics

Edited by Chad Woolley

Merge request reports

Loading