Commit a6e30424 authored by Simon Knox's avatar Simon Knox

Make time window links take up full dropdown width

parent d7f50276
<script> <script>
import { import { GlButton, GlDropdown, GlDropdownItem, GlModal, GlModalDirective } from '@gitlab/ui';
GlButton,
GlDropdown,
GlDropdownItem,
GlModal,
GlModalDirective,
GlLink,
} from '@gitlab/ui';
import _ from 'underscore'; import _ from 'underscore';
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
...@@ -31,7 +24,6 @@ export default { ...@@ -31,7 +24,6 @@ export default {
GlButton, GlButton,
GlDropdown, GlDropdown,
GlDropdownItem, GlDropdownItem,
GlLink,
GlModal, GlModal,
}, },
directives: { directives: {
...@@ -255,7 +247,9 @@ export default { ...@@ -255,7 +247,9 @@ export default {
v-for="(value, key) in timeWindows" v-for="(value, key) in timeWindows"
:key="key" :key="key"
:active="activeTimeWindow(key)" :active="activeTimeWindow(key)"
><gl-link :href="setTimeWindowParameter(key)">{{ value }}</gl-link></gl-dropdown-item :href="setTimeWindowParameter(key)"
active-class="active"
>{{ value }}</gl-dropdown-item
> >
</gl-dropdown> </gl-dropdown>
</div> </div>
......
---
title: Enlarge metrics time-window dropdown links
merge_request: 29458
author:
type: fixed
...@@ -314,9 +314,7 @@ describe('Dashboard', () => { ...@@ -314,9 +314,7 @@ describe('Dashboard', () => {
}); });
setTimeout(() => { setTimeout(() => {
const selectedTimeWindow = component.$el.querySelector( const selectedTimeWindow = component.$el.querySelector('.js-time-window-dropdown .active');
'.js-time-window-dropdown [active="true"]',
);
expect(selectedTimeWindow.textContent.trim()).toEqual('30 minutes'); expect(selectedTimeWindow.textContent.trim()).toEqual('30 minutes');
done(); done();
......
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