Commit dd06e804 authored by pburdette's avatar pburdette

Add switch branch tooltip

Add switch branch tooltip to
the branch switcher on the pipeline
editor.
parent c87f2d89
...@@ -6,6 +6,7 @@ import { ...@@ -6,6 +6,7 @@ import {
GlInfiniteScroll, GlInfiniteScroll,
GlLoadingIcon, GlLoadingIcon,
GlSearchBoxByType, GlSearchBoxByType,
GlTooltipDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { produce } from 'immer'; import { produce } from 'immer';
import { fetchPolicies } from '~/lib/graphql'; import { fetchPolicies } from '~/lib/graphql';
...@@ -22,7 +23,7 @@ import getCurrentBranch from '~/pipeline_editor/graphql/queries/client/current_b ...@@ -22,7 +23,7 @@ import getCurrentBranch from '~/pipeline_editor/graphql/queries/client/current_b
export default { export default {
i18n: { i18n: {
dropdownHeader: s__('Switch Branch'), dropdownHeader: s__('Switch branch'),
title: s__('Branches'), title: s__('Branches'),
fetchError: s__('Unable to fetch branch list for this project.'), fetchError: s__('Unable to fetch branch list for this project.'),
}, },
...@@ -35,6 +36,9 @@ export default { ...@@ -35,6 +36,9 @@ export default {
GlLoadingIcon, GlLoadingIcon,
GlSearchBoxByType, GlSearchBoxByType,
}, },
directives: {
GlTooltip: GlTooltipDirective,
},
inject: ['projectFullPath', 'totalBranches'], inject: ['projectFullPath', 'totalBranches'],
props: { props: {
paginationLimit: { paginationLimit: {
...@@ -180,6 +184,8 @@ export default { ...@@ -180,6 +184,8 @@ export default {
<template> <template>
<gl-dropdown <gl-dropdown
v-if="showBranchSwitcher" v-if="showBranchSwitcher"
v-gl-tooltip.hover
:title="$options.i18n.dropdownHeader"
:header-text="$options.i18n.dropdownHeader" :header-text="$options.i18n.dropdownHeader"
:text="currentBranch" :text="currentBranch"
icon="branch" icon="branch"
......
...@@ -31629,7 +31629,7 @@ msgstr "" ...@@ -31629,7 +31629,7 @@ msgstr ""
msgid "Survey Response" msgid "Survey Response"
msgstr "" msgstr ""
msgid "Switch Branch" msgid "Switch branch"
msgstr "" msgstr ""
msgid "Switch branch/tag" msgid "Switch branch/tag"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment