Commit 7d86a048 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Add value_stream_selector component

Moves the create value stream into
a separate component

Adds the create value stream modal
parent 8068bdb0
...@@ -20,13 +20,13 @@ import CustomStageForm from './custom_stage_form.vue'; ...@@ -20,13 +20,13 @@ import CustomStageForm from './custom_stage_form.vue';
import PathNavigation from './path_navigation.vue'; import PathNavigation from './path_navigation.vue';
import MetricCard from '../../shared/components/metric_card.vue'; import MetricCard from '../../shared/components/metric_card.vue';
import FilterBar from './filter_bar.vue'; import FilterBar from './filter_bar.vue';
import ValueStreamSelect from './value_stream_select.vue';
export default { export default {
name: 'CycleAnalytics', name: 'CycleAnalytics',
components: { components: {
DateRange, DateRange,
DurationChart, DurationChart,
GlButton,
GlLoadingIcon, GlLoadingIcon,
GlEmptyState, GlEmptyState,
GroupsDropdownFilter, GroupsDropdownFilter,
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
PathNavigation, PathNavigation,
MetricCard, MetricCard,
FilterBar, FilterBar,
ValueStreamSelect,
}, },
mixins: [UrlSyncMixin], mixins: [UrlSyncMixin],
props: { props: {
...@@ -231,9 +232,7 @@ export default { ...@@ -231,9 +232,7 @@ export default {
'gl-mt-5': !isXSBreakpoint, 'gl-mt-5': !isXSBreakpoint,
}" }"
> >
<gl-button data-testid="create-value-stream" @click="onCreateValueStream">{{ <value-stream-select @create="onCreateValueStream" />
__('Create new value stream')
}}</gl-button>
</div> </div>
</div> </div>
<div class="mw-100"> <div class="mw-100">
......
<script>
import { GlButton, GlFormInput, GlModal, GlModalDirective } from '@gitlab/ui';
export default {
components: {
GlButton,
GlFormInput,
GlModal,
},
directives: {
GlModalDirective,
},
props: {},
computed: {},
data() {
return {
name: '',
};
},
};
</script>
<template>
<div>
<gl-button
v-gl-modal-directive="'create-value-stream-modal'"
data-testid="create-value-stream"
>{{ __('Create new value stream') }}</gl-button
>
<!-- no-fade: no idea 🤷‍♂️ -->
<gl-modal
modal-id="create-value-stream-modal"
:title="__('Value stream name')"
no-fade
:action-primary="{ text: __('Create value stream') }"
:action-cancel="{ text: __('Cancel') }"
@primary="$emit('create')"
>
<gl-form-input id="name" :value="name" :placeholder="__('Example: My value stream')" />
</gl-modal>
<!-- :action-cancel -->
</div>
</template>
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