Commit e6639161 authored by Miguel Rincon's avatar Miguel Rincon

Replace "Go back" with "Collapse" button for expanded charts

When a Metrics user expands a panel, the expanded panel has a back
button to go back to the dashboard. We should replace the "Go back"
button with a "Collapse panel" button since it's the logical action
to undo "Expand panel".
parent 120056e5
......@@ -2,7 +2,7 @@
import { mapActions, mapState, mapGetters } from 'vuex';
import VueDraggable from 'vuedraggable';
import Mousetrap from 'mousetrap';
import { GlIcon, GlButton, GlModalDirective, GlTooltipDirective } from '@gitlab/ui';
import { GlButton, GlModalDirective, GlTooltipDirective } from '@gitlab/ui';
import DashboardHeader from './dashboard_header.vue';
import DashboardPanel from './dashboard_panel.vue';
import { s__ } from '~/locale';
......@@ -34,7 +34,6 @@ export default {
DashboardHeader,
DashboardPanel,
Icon,
GlIcon,
GlButton,
GraphGroup,
EmptyState,
......@@ -389,7 +388,8 @@ export default {
},
},
i18n: {
goBackLabel: s__('Metrics|Go back (Esc)'),
collapsePanelLabel: s__('Metrics|Collapse panel'),
collapsePanelTooltip: s__('Metrics|Collapse panel (Esc)'),
},
};
</script>
......@@ -429,14 +429,10 @@ export default {
ref="goBackBtn"
v-gl-tooltip
class="mr-3 my-3"
:title="$options.i18n.goBackLabel"
:title="$options.i18n.collapsePanelTooltip"
@click="onGoBack"
>
<gl-icon
name="arrow-left"
:aria-label="$options.i18n.goBackLabel"
class="text-secondary"
/>
{{ $options.i18n.collapsePanelLabel }}
</gl-button>
</template>
</dashboard-panel>
......
---
title: Replace Go Back with Collapse button for expanded Metric charts
merge_request: 39307
author:
type: changed
......@@ -15293,6 +15293,12 @@ msgstr ""
msgid "Metrics|Check out the CI/CD documentation on deploying to an environment"
msgstr ""
msgid "Metrics|Collapse panel"
msgstr ""
msgid "Metrics|Collapse panel (Esc)"
msgstr ""
msgid "Metrics|Copy YAML"
msgstr ""
......@@ -15355,9 +15361,6 @@ msgstr ""
msgid "Metrics|For grouping similar metrics"
msgstr ""
msgid "Metrics|Go back (Esc)"
msgstr ""
msgid "Metrics|Invalid time range, please verify."
msgstr ""
......
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