diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-08-03 18:14:05 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-08-03 18:14:55 +0300 |
commit | 4f4290ffed217af2187c6b0ecc14de6090fda983 (patch) | |
tree | 663faac18cb464ccbe86078926e16dc5e8e1d313 /app | |
parent | 3a5885c4cc7b5ad99c2eda0368e9c5a0eb60f906 (diff) |
Moves help_popover component to a common location
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/help_popover.vue (renamed from app/assets/javascripts/vue_shared/components/reports/help_popover.vue) | 9 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/components/reports/report_section.vue | 2 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/components/reports/summary_row.vue | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/app/assets/javascripts/vue_shared/components/reports/help_popover.vue b/app/assets/javascripts/vue_shared/components/help_popover.vue index c5faa29fd2a..540df392e4e 100644 --- a/app/assets/javascripts/vue_shared/components/reports/help_popover.vue +++ b/app/assets/javascripts/vue_shared/components/help_popover.vue @@ -4,15 +4,20 @@ import Icon from '~/vue_shared/components/icon.vue'; import { inserted } from '~/feature_highlight/feature_highlight_helper'; import { mouseenter, debouncedMouseleave, togglePopover } from '~/shared/popover'; +/** + * Render a button with a question mark icon + * On hover shows a popover. The popover will be dismissed on mouseleave + */ export default { - name: 'ReportsHelpPopover', + name: 'HelpPopover', components: { Icon, }, props: { options: { type: Object, - required: true, + required: false, + default: () => ({}), }, }, mounted() { diff --git a/app/assets/javascripts/vue_shared/components/reports/report_section.vue b/app/assets/javascripts/vue_shared/components/reports/report_section.vue index 0124d8b5bcc..a6dbf21092b 100644 --- a/app/assets/javascripts/vue_shared/components/reports/report_section.vue +++ b/app/assets/javascripts/vue_shared/components/reports/report_section.vue @@ -2,7 +2,7 @@ import { __ } from '~/locale'; import StatusIcon from '~/vue_merge_request_widget/components/mr_widget_status_icon.vue'; import IssuesList from './issues_list.vue'; -import Popover from './help_popover.vue'; +import Popover from '../help_popover.vue'; const LOADING = 'LOADING'; const ERROR = 'ERROR'; diff --git a/app/assets/javascripts/vue_shared/components/reports/summary_row.vue b/app/assets/javascripts/vue_shared/components/reports/summary_row.vue index 28156d7c983..063beab58fc 100644 --- a/app/assets/javascripts/vue_shared/components/reports/summary_row.vue +++ b/app/assets/javascripts/vue_shared/components/reports/summary_row.vue @@ -1,7 +1,7 @@ <script> import CiIcon from '~/vue_shared/components/ci_icon.vue'; import LoadingIcon from '~/vue_shared/components/loading_icon.vue'; -import Popover from './help_popover.vue'; +import Popover from '../help_popover.vue'; /** * Renders the summary row for each report |