summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 18:08:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 18:08:53 +0000
commitd933bc5a8738d24898c5a82cc72ee9bd050425e6 (patch)
tree6d4c5ffedc32dc82c3fd6e4e3031f7981505655a /app
parent3f9e1b261121f4dbd045341241f81b47356c99cf (diff)
downloadgitlab-ce-d933bc5a8738d24898c5a82cc72ee9bd050425e6.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue17
-rw-r--r--app/assets/javascripts/flash.js20
-rw-r--r--app/assets/javascripts/vue_shared/components/identicon.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/issue/issue_warning.vue6
-rw-r--r--app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue2
5 files changed, 34 insertions, 13 deletions
diff --git a/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue b/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue
index fa2609a3176..e2909333d74 100644
--- a/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue
+++ b/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue
@@ -59,21 +59,25 @@ export default {
</script>
<template>
<div>
- <div v-if="!isLocalStorageAvailable" class="dropdown-info-note">
+ <div v-if="!isLocalStorageAvailable" ref="localStorageNote" class="dropdown-info-note">
{{ __('This feature requires local storage to be enabled') }}
</div>
<ul v-else-if="hasItems">
- <li v-for="(item, index) in processedItems" :key="`processed-items-${index}`">
+ <li
+ v-for="(item, index) in processedItems"
+ ref="dropdownItem"
+ :key="`processed-items-${index}`"
+ >
<button
type="button"
- class="filtered-search-history-dropdown-item"
+ class="filtered-search-history-dropdown-item js-dropdown-button"
@click="onItemActivated(item.text)"
>
<span>
<span
v-for="(token, tokenIndex) in item.tokens"
:key="`dropdown-token-${tokenIndex}`"
- class="filtered-search-history-dropdown-token"
+ class="filtered-search-history-dropdown-token js-dropdown-token"
>
<span class="name">{{ token.prefix }}</span>
<span class="name">{{ token.operator }}</span>
@@ -88,6 +92,7 @@ export default {
<li class="divider"></li>
<li>
<button
+ ref="clearButton"
type="button"
class="filtered-search-history-clear-button"
@click="onRequestClearRecentSearches($event)"
@@ -96,6 +101,8 @@ export default {
</button>
</li>
</ul>
- <div v-else class="dropdown-info-note">{{ __("You don't have any recent searches") }}</div>
+ <div v-else ref="dropdownNote" class="dropdown-info-note">
+ {{ __("You don't have any recent searches") }}
+ </div>
</div>
</template>
diff --git a/app/assets/javascripts/flash.js b/app/assets/javascripts/flash.js
index 2c3320b5e79..347f7b450ff 100644
--- a/app/assets/javascripts/flash.js
+++ b/app/assets/javascripts/flash.js
@@ -1,6 +1,13 @@
import _ from 'underscore';
import { spriteIcon } from './lib/utils/common_utils';
+const FLASH_TYPES = {
+ ALERT: 'alert',
+ NOTICE: 'notice',
+ SUCCESS: 'success',
+ WARNING: 'warning',
+};
+
const hideFlash = (flashEl, fadeTransition = true) => {
if (fadeTransition) {
Object.assign(flashEl.style, {
@@ -59,7 +66,7 @@ const removeFlashClickListener = (flashEl, fadeTransition) => {
* additional action or link on banner next to message
*
* @param {String} message Flash message text
- * @param {String} type Type of Flash, it can be `notice` or `alert` (default)
+ * @param {String} type Type of Flash, it can be `notice`, `success`, `warning` or `alert` (default)
* @param {Object} parent Reference to parent element under which Flash needs to appear
* @param {Object} actonConfig Map of config to show action on banner
* @param {String} href URL to which action config should point to (default: '#')
@@ -69,7 +76,7 @@ const removeFlashClickListener = (flashEl, fadeTransition) => {
*/
const createFlash = function createFlash(
message,
- type = 'alert',
+ type = FLASH_TYPES.ALERT,
parent = document,
actionConfig = null,
fadeTransition = true,
@@ -102,5 +109,12 @@ const createFlash = function createFlash(
return flashContainer;
};
-export { createFlash as default, createFlashEl, createAction, hideFlash, removeFlashClickListener };
+export {
+ createFlash as default,
+ createFlashEl,
+ createAction,
+ hideFlash,
+ removeFlashClickListener,
+ FLASH_TYPES,
+};
window.Flash = createFlash;
diff --git a/app/assets/javascripts/vue_shared/components/identicon.vue b/app/assets/javascripts/vue_shared/components/identicon.vue
index d42f0d8192c..9dd61c8eada 100644
--- a/app/assets/javascripts/vue_shared/components/identicon.vue
+++ b/app/assets/javascripts/vue_shared/components/identicon.vue
@@ -29,7 +29,7 @@ export default {
</script>
<template>
- <div :class="[sizeClass, identiconBackgroundClass]" class="avatar identicon">
+ <div ref="identicon" :class="[sizeClass, identiconBackgroundClass]" class="avatar identicon">
{{ identiconTitle }}
</div>
</template>
diff --git a/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue b/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
index 47f0851f650..b5d3f3685bc 100644
--- a/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
+++ b/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
@@ -65,14 +65,14 @@ export default {
<div class="issuable-note-warning">
<icon v-if="!isLockedAndConfidential" :name="warningIcon" :size="16" class="icon inline" />
- <span v-if="isLockedAndConfidential">
+ <span v-if="isLockedAndConfidential" ref="lockedAndConfidential">
<span v-html="confidentialAndLockedDiscussionText"></span>
{{
__("People without permission will never get a notification and won't be able to comment.")
}}
</span>
- <span v-else-if="isConfidential">
+ <span v-else-if="isConfidential" ref="confidential">
{{ __('This is a confidential issue.') }}
{{ __('People without permission will never get a notification.') }}
<gl-link :href="confidentialIssueDocsPath" target="_blank">
@@ -80,7 +80,7 @@ export default {
</gl-link>
</span>
- <span v-else-if="isLocked">
+ <span v-else-if="isLocked" ref="locked">
{{ __('This issue is locked.') }}
{{ __('Only project members can comment.') }}
<gl-link :href="lockedIssueDocsPath" target="_blank">
diff --git a/app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue b/app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue
index af02b8969ee..69afd711797 100644
--- a/app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue
+++ b/app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue
@@ -47,7 +47,7 @@ export default {
:img-size="40"
/>
</div>
- <div :class="{ discussion: !note.individual_note }" class="timeline-content">
+ <div ref="note" :class="{ discussion: !note.individual_note }" class="timeline-content">
<div class="note-header">
<div class="note-header-info">
<a :href="getUserData.path">