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