Commit 6f1851a0 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'fix/334334-move-todo-button' into 'master'

Fix: 334334 move todo_button.vue to sidebar

See merge request gitlab-org/gitlab!64900
parents 33b5009b 8066d87c
<script> <script>
import todoMarkDoneMutation from '~/graphql_shared/mutations/todo_mark_done.mutation.graphql'; import todoMarkDoneMutation from '~/graphql_shared/mutations/todo_mark_done.mutation.graphql';
import TodoButton from '~/vue_shared/components/todo_button.vue'; import TodoButton from '~/vue_shared/components/sidebar/todo_button.vue';
import createDesignTodoMutation from '../graphql/mutations/create_design_todo.mutation.graphql'; import createDesignTodoMutation from '../graphql/mutations/create_design_todo.mutation.graphql';
import getDesignQuery from '../graphql/queries/get_design.query.graphql'; import getDesignQuery from '../graphql/queries/get_design.query.graphql';
import allVersionsMixin from '../mixins/all_versions'; import allVersionsMixin from '../mixins/all_versions';
......
...@@ -4,7 +4,7 @@ import { produce } from 'immer'; ...@@ -4,7 +4,7 @@ import { produce } from 'immer';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import { todoQueries, TodoMutationTypes, todoMutations } from '~/sidebar/constants'; import { todoQueries, TodoMutationTypes, todoMutations } from '~/sidebar/constants';
import TodoButton from '~/vue_shared/components/todo_button.vue'; import TodoButton from '~/vue_shared/components/sidebar/todo_button.vue';
export default { export default {
components: { components: {
......
...@@ -38,13 +38,14 @@ To add a story: ...@@ -38,13 +38,14 @@ To add a story:
```txt ```txt
vue_shared/ vue_shared/
├─ components/ ├─ components/
│ ├─ todo_button.vue │ ├─ sidebar
│ ├─ todo_button.stories.js │ │ ├─ todo_button.vue
│ │ ├─ todo_button.stories.js
``` ```
1. Write the story as per the [official Storybook instructions](https://storybook.js.org/docs/vue/writing-stories/introduction/) 1. Write the story as per the [official Storybook instructions](https://storybook.js.org/docs/vue/writing-stories/introduction/)
Notes: Notes:
- Specify the `title` field of the story as the component's file path from the `javascripts/` directory, - Specify the `title` field of the story as the component's file path from the `javascripts/` directory,
e.g. if the component is located at `app/assets/javascripts/vue_shared/components/todo_button.vue`, specify the `title` as e.g. if the component is located at `app/assets/javascripts/vue_shared/components/sidebar/todo_button.vue`, specify the `title` as
`vue_shared/components/To-do Button`. This will ensure the Storybook navigation maps closely to our internal directory structure. `vue_shared/components/To-do Button`. This will ensure the Storybook navigation maps closely to our internal directory structure.
...@@ -2,7 +2,7 @@ import { shallowMount, mount } from '@vue/test-utils'; ...@@ -2,7 +2,7 @@ import { shallowMount, mount } from '@vue/test-utils';
import DesignTodoButton from '~/design_management/components/design_todo_button.vue'; import DesignTodoButton from '~/design_management/components/design_todo_button.vue';
import createDesignTodoMutation from '~/design_management/graphql/mutations/create_design_todo.mutation.graphql'; import createDesignTodoMutation from '~/design_management/graphql/mutations/create_design_todo.mutation.graphql';
import todoMarkDoneMutation from '~/graphql_shared/mutations/todo_mark_done.mutation.graphql'; import todoMarkDoneMutation from '~/graphql_shared/mutations/todo_mark_done.mutation.graphql';
import TodoButton from '~/vue_shared/components/todo_button.vue'; import TodoButton from '~/vue_shared/components/sidebar/todo_button.vue';
import mockDesign from '../mock_data/design'; import mockDesign from '../mock_data/design';
const mockDesignWithPendingTodos = { const mockDesignWithPendingTodos = {
......
...@@ -6,7 +6,7 @@ import waitForPromises from 'helpers/wait_for_promises'; ...@@ -6,7 +6,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import createFlash from '~/flash'; import createFlash from '~/flash';
import SidebarTodoWidget from '~/sidebar/components/todo_toggle/sidebar_todo_widget.vue'; import SidebarTodoWidget from '~/sidebar/components/todo_toggle/sidebar_todo_widget.vue';
import epicTodoQuery from '~/sidebar/queries/epic_todo.query.graphql'; import epicTodoQuery from '~/sidebar/queries/epic_todo.query.graphql';
import TodoButton from '~/vue_shared/components/todo_button.vue'; import TodoButton from '~/vue_shared/components/sidebar/todo_button.vue';
import { todosResponse, noTodosResponse } from '../../mock_data'; import { todosResponse, noTodosResponse } from '../../mock_data';
jest.mock('~/flash'); jest.mock('~/flash');
......
import { GlButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { shallowMount, mount } from '@vue/test-utils'; import { shallowMount, mount } from '@vue/test-utils';
import TodoButton from '~/vue_shared/components/todo_button.vue'; import TodoButton from '~/vue_shared/components/sidebar/todo_button.vue';
describe('Todo Button', () => { describe('Todo Button', () => {
let wrapper; let wrapper;
......
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