Refactor remnants of CoffeeScript destructured opts and super into ES6
What does this MR do?
Gets rid of some CoffeeScript remnants that are difficult to work with, and updates them to use ES6 syntax/constructs. I updated nearby code to ES6, but these updates usually just included using the es6 class syntax and scoped variable keywords.
Important: For the most part, I tried to avoid refactoring the design of the existing code. If I attempted that, this would've taken much much longer and it would've been out of this issue's scope.
Why was this MR needed?
The compiled coffeescript for destructured default params is very difficult to work in.
These changes makes some of these rough patches more maintainable:
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Meta Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/21887
Child Issues:
https://gitlab.com/gitlab-org/gitlab-ce/issues/21942
https://gitlab.com/gitlab-org/gitlab-ce/issues/21941
https://gitlab.com/gitlab-org/gitlab-ce/issues/21943
To Test Manually:
diff
app/assets/javascripts/LabelManager.js.es6 ->- Navigate to Labels and click around (toggle label priority, add new labels, subcribe, edit, delete)
diff
app/assets/javascripts/blob/blob_ci_yaml.js.es6 ->-
Create new file and give it the name
.gitlab-ci.yml
, then attempt to select a template
diff
app/assets/javascripts/blob/blob_license_selectors.js.es6 ->-
Create new file and give it the name
license
, then attempt to select a template
diff
app/assets/javascripts/blob/template_selector.js.es6 ->- This class is extended by the two previously mentioned files. As long as they work, this should work.
diff
app/assets/javascripts/issues-bulk-assignment.js.es6 ->- Visit issues, assign multiple issues a new label or milestone and update.
diff
app/assets/javascripts/profile/gl_crop.js.es6 ->- Visit your profile settings, upload a photo and attempt to crop and set as new profile picture.
diff
app/assets/javascripts/profile/profile.js.es6 >- Visit your profile settings, change various fields (Name, Bio, Email, Notifs settings) and submit form
diff
app/assets/javascripts/todos.js.es6 ->- Visit an issue and Add Todo, then visit Todos. Try out the sorting features, making sure everything looks right. Mark the Todo done.
diff
app/assets/javascripts/user.js.es6 ->- Visit user profile and click between tabs.
diff
app/assets/javascripts/user_tabs.js.es6 ->- Same as previous.
cc: @jschatz1