Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8066d87c
Commit
8066d87c
authored
Jul 05, 2021
by
Jeremy Wu
Committed by
Kushal Pandya
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: 334334 move todo_button.vue to sidebar
parent
b8c60881
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
8 deletions
+9
-8
app/assets/javascripts/design_management/components/design_todo_button.vue
...ripts/design_management/components/design_todo_button.vue
+1
-1
app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue
...ts/sidebar/components/todo_toggle/sidebar_todo_widget.vue
+1
-1
app/assets/javascripts/vue_shared/components/sidebar/todo_button.stories.js
...ipts/vue_shared/components/sidebar/todo_button.stories.js
+0
-0
app/assets/javascripts/vue_shared/components/sidebar/todo_button.vue
...javascripts/vue_shared/components/sidebar/todo_button.vue
+0
-0
doc/development/fe_guide/storybook.md
doc/development/fe_guide/storybook.md
+4
-3
spec/frontend/design_management/components/design_todo_button_spec.js
...d/design_management/components/design_todo_button_spec.js
+1
-1
spec/frontend/sidebar/components/todo_toggle/sidebar_todo_widget_spec.js
...idebar/components/todo_toggle/sidebar_todo_widget_spec.js
+1
-1
spec/frontend/vue_shared/components/sidebar/todo_button_spec.js
...rontend/vue_shared/components/sidebar/todo_button_spec.js
+1
-1
No files found.
app/assets/javascripts/design_management/components/design_todo_button.vue
View file @
8066d87c
<
script
>
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
getDesignQuery
from
'
../graphql/queries/get_design.query.graphql
'
;
import
allVersionsMixin
from
'
../mixins/all_versions
'
;
...
...
app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue
View file @
8066d87c
...
...
@@ -4,7 +4,7 @@ import { produce } from 'immer';
import
createFlash
from
'
~/flash
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
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
{
components
:
{
...
...
app/assets/javascripts/vue_shared/components/todo_button.stories.js
→
app/assets/javascripts/vue_shared/components/
sidebar/
todo_button.stories.js
View file @
8066d87c
File moved
app/assets/javascripts/vue_shared/components/todo_button.vue
→
app/assets/javascripts/vue_shared/components/
sidebar/
todo_button.vue
View file @
8066d87c
File moved
doc/development/fe_guide/storybook.md
View file @
8066d87c
...
...
@@ -38,13 +38,14 @@ To add a story:
```txt
vue_shared/
├─ components/
│ ├─ todo_button.vue
│ ├─ todo_button.stories.js
│ ├─ sidebar
│ │ ├─ 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
)
Notes:
-
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.
spec/frontend/design_management/components/design_todo_button_spec.js
View file @
8066d87c
...
...
@@ -2,7 +2,7 @@ import { shallowMount, mount } from '@vue/test-utils';
import
DesignTodoButton
from
'
~/design_management/components/design_todo_button.vue
'
;
import
createDesignTodoMutation
from
'
~/design_management/graphql/mutations/create_design_todo.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
'
;
const
mockDesignWithPendingTodos
=
{
...
...
spec/frontend/sidebar/components/todo_toggle/sidebar_todo_widget_spec.js
View file @
8066d87c
...
...
@@ -6,7 +6,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import
createFlash
from
'
~/flash
'
;
import
SidebarTodoWidget
from
'
~/sidebar/components/todo_toggle/sidebar_todo_widget.vue
'
;
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
'
;
jest
.
mock
(
'
~/flash
'
);
...
...
spec/frontend/vue_shared/components/todo_button_spec.js
→
spec/frontend/vue_shared/components/
sidebar/
todo_button_spec.js
View file @
8066d87c
import
{
GlButton
}
from
'
@gitlab/ui
'
;
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
'
,
()
=>
{
let
wrapper
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment