Fix technical debt cause by Merge Request Notes refactor
While debugging the code added here https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#3ce7f1dd43287a1d04e957283a8f7ff4e3f60ec3_80_93
I found the following problems:
-
camelCaseKeysfunction is duplicated and is not used. This was pointed in the MR, but somehow was merged. Fixed in: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/17667 -
Sprintf with user generated content needs to be escaped: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#e75a068a217e33deac9009c31c835d7b972d2210_67_79
-
Do i18n properly:https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62474836
-
v-htmlshouldn't be used: -
Identation doesn't follow the styleguide: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#3e9f352f8d1d561f5108008cbec308921f6eb9d5_0_82
-
SVGs should use
icon.vue: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#a8841151b538089b177018118015a54d494223a3_0_45 -
A span with
type=buttonhttps://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#a8841151b538089b177018118015a54d494223a3_0_77 -
a class named
.line-resolved-text: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#a8841151b538089b177018118015a54d494223a3_0_77 -
button without type: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62474218
-
Unecessay reassignment https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62474165
-
Button without type https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#d7023f611ef2e7cf7310e5813e81acb8bf38ed6f_171_184
-
loading_icon.vue should have been used https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62476132
-
icon.vue should have been used: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62476218
-
no button type https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62476243
-
Unresolved fixme comment: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62476357
-
foreach was used instead of reduce. Decreases performance & readability: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62473611
-
Improve variable naming: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62476577
-
what is this foreach doing? https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#note_62473672
-
component order is not the same as the styleguide: https://gitlab.com/gitlab-org/gitlab-ce/commit/059ab73b8eae3a546d0a19fe99ef0c52df5fac01#5ff60f23cdeb24af173d741ad2c3373aa3b23d35_0_1