Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/lib/utils/text_utility.js20
-rw-r--r--app/assets/javascripts/releases/components/release_block_header.vue4
-rw-r--r--app/assets/stylesheets/page_bundles/ide.scss5
3 files changed, 19 insertions, 10 deletions
diff --git a/app/assets/javascripts/lib/utils/text_utility.js b/app/assets/javascripts/lib/utils/text_utility.js
index 9ed286826cc..f857e618d89 100644
--- a/app/assets/javascripts/lib/utils/text_utility.js
+++ b/app/assets/javascripts/lib/utils/text_utility.js
@@ -142,11 +142,25 @@ export const stripHtml = (string, replace = '') => {
};
/**
- * Converts snake_case string to camelCase
+ * Converts a snake_cased string to camelCase.
+ * Leading and trailing underscores are ignored.
*
- * @param {*} string
+ * @param {String} string The snake_cased string to convert
+ * @returns {String} A camelCased version of the string
+ *
+ * @example
+ *
+ * // returns "aSnakeCasedString"
+ * convertToCamelCase('a_snake_cased_string')
+ *
+ * // returns "_leadingUnderscore"
+ * convertToCamelCase('_leading_underscore')
+ *
+ * // returns "trailingUnderscore_"
+ * convertToCamelCase('trailing_underscore_')
*/
-export const convertToCamelCase = string => string.replace(/(_\w)/g, s => s[1].toUpperCase());
+export const convertToCamelCase = string =>
+ string.replace(/([a-z0-9])_([a-z0-9])/gi, (match, p1, p2) => `${p1}${p2.toUpperCase()}`);
/**
* Converts camelCase string to snake_case
diff --git a/app/assets/javascripts/releases/components/release_block_header.vue b/app/assets/javascripts/releases/components/release_block_header.vue
index f0d3f3f8c1d..0bc2a5ce2eb 100644
--- a/app/assets/javascripts/releases/components/release_block_header.vue
+++ b/app/assets/javascripts/releases/components/release_block_header.vue
@@ -20,10 +20,10 @@ export default {
},
computed: {
editLink() {
- return this.release.Links?.editUrl;
+ return this.release._links?.editUrl;
},
selfLink() {
- return this.release.Links?.self;
+ return this.release._links?.self;
},
},
};
diff --git a/app/assets/stylesheets/page_bundles/ide.scss b/app/assets/stylesheets/page_bundles/ide.scss
index 4b838b1383e..a748c669ee8 100644
--- a/app/assets/stylesheets/page_bundles/ide.scss
+++ b/app/assets/stylesheets/page_bundles/ide.scss
@@ -994,11 +994,6 @@ $ide-commit-header-height: 48px;
}
.ide-context-header {
- .ide-merge-requests-dropdown.dropdown-menu {
- width: 385px;
- max-height: initial;
- }
-
.avatar-container {
flex: 0 0 auto;
margin-right: 0;