Skip to content

Refactor template selector JavaScript

username-removed-408230 requested to merge refactor-templates-js into master

In preparation for changes to template selector logic in %9.1, this MR refactors files related to template selectors to use the update syntax for class and modules.

No substantive refactoring was intended here. The goal was to make these files easier to work in by way of cleaner syntax and uniform structure.

Summary of changes:

  1. Move files related to TemplateSelector into a sub-directory within blob directory.
  2. Refactor all files to use ES6 and module loading syntax.
  3. Improve method naming in TemplateSelector
  4. Remove unnecessary context assignments with bind
  5. Update references to these files elsewhere in the javascript codebase

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9782 will be based on refactoring in this MR.

EE Compatible MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1496

Merge request reports