Commit ecc42725 authored by Frédéric Caplette's avatar Frédéric Caplette

Merge branch '331687-add-switch-branch-tooltip-editor' into 'master'

Adds tooltip for pipeline editor branch switcher

See merge request gitlab-org/gitlab!63675
parents 7daa8a09 dd06e804
...@@ -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"
......
...@@ -31650,7 +31650,7 @@ msgstr "" ...@@ -31650,7 +31650,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