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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
36df19e7
Commit
36df19e7
authored
May 15, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop passing through the store object
[ci skip]
parent
14387b49
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
16 deletions
+15
-16
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+4
-1
app/assets/javascripts/issue_show/components/fields/title.vue
...assets/javascripts/issue_show/components/fields/title.vue
+2
-7
app/assets/javascripts/issue_show/components/title.vue
app/assets/javascripts/issue_show/components/title.vue
+2
-2
spec/javascripts/issue_show/components/fields/title_spec.js
spec/javascripts/issue_show/components/fields/title_spec.js
+1
-1
spec/javascripts/issue_show/components/title_spec.js
spec/javascripts/issue_show/components/title_spec.js
+6
-5
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
36df19e7
...
@@ -59,6 +59,9 @@ export default {
...
@@ -59,6 +59,9 @@ export default {
elementType
()
{
elementType
()
{
return
this
.
showForm
?
'
form
'
:
'
div
'
;
return
this
.
showForm
?
'
form
'
:
'
div
'
;
},
},
formState
()
{
return
this
.
store
.
formState
;
},
},
},
components
:
{
components
:
{
descriptionComponent
,
descriptionComponent
,
...
@@ -142,7 +145,7 @@ export default {
...
@@ -142,7 +145,7 @@ export default {
<
template
>
<
template
>
<div
:is=
"elementType"
>
<div
:is=
"elementType"
>
<title-component
<title-component
:
store=
"stor
e"
:
form-state=
"formStat
e"
:show-form=
"showForm"
:show-form=
"showForm"
:issuable-ref=
"issuableRef"
:issuable-ref=
"issuableRef"
:title-html=
"state.titleHtml"
:title-html=
"state.titleHtml"
...
...
app/assets/javascripts/issue_show/components/fields/title.vue
View file @
36df19e7
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
stor
e
:
{
formStat
e
:
{
type
:
Object
,
type
:
Object
,
required
:
true
,
required
:
true
,
},
},
},
},
data
()
{
return
{
state
:
this
.
store
.
formState
,
};
},
};
};
</
script
>
</
script
>
...
@@ -27,6 +22,6 @@
...
@@ -27,6 +22,6 @@
type=
"text"
type=
"text"
placeholder=
"Issue title"
placeholder=
"Issue title"
aria-label=
"Issue title"
aria-label=
"Issue title"
v-model=
"
s
tate.title"
/>
v-model=
"
formS
tate.title"
/>
</fieldset>
</fieldset>
</
template
>
</
template
>
app/assets/javascripts/issue_show/components/title.vue
View file @
36df19e7
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
stor
e
:
{
formStat
e
:
{
type
:
Object
,
type
:
Object
,
required
:
true
,
required
:
true
,
},
},
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<div>
<div>
<title-field
<title-field
v-if=
"showForm"
v-if=
"showForm"
:
store=
"stor
e"
/>
:
form-state=
"formStat
e"
/>
<h2
<h2
v-else
v-else
class=
"title"
class=
"title"
...
...
spec/javascripts/issue_show/components/fields/title_spec.js
View file @
36df19e7
...
@@ -17,7 +17,7 @@ describe('Title field component', () => {
...
@@ -17,7 +17,7 @@ describe('Title field component', () => {
vm
=
new
Component
({
vm
=
new
Component
({
propsData
:
{
propsData
:
{
stor
e
,
formState
:
store
.
formStat
e
,
},
},
}).
$mount
();
}).
$mount
();
});
});
...
...
spec/javascripts/issue_show/components/title_spec.js
View file @
36df19e7
...
@@ -7,17 +7,18 @@ describe('Title component', () => {
...
@@ -7,17 +7,18 @@ describe('Title component', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
const
Component
=
Vue
.
extend
(
titleComponent
);
const
Component
=
Vue
.
extend
(
titleComponent
);
const
store
=
new
Store
({
titleHtml
:
''
,
descriptionHtml
:
''
,
issuableRef
:
''
,
});
vm
=
new
Component
({
vm
=
new
Component
({
propsData
:
{
propsData
:
{
issuableRef
:
'
#1
'
,
issuableRef
:
'
#1
'
,
titleHtml
:
'
Testing <img />
'
,
titleHtml
:
'
Testing <img />
'
,
titleText
:
'
Testing
'
,
titleText
:
'
Testing
'
,
showForm
:
false
,
showForm
:
false
,
store
:
new
Store
({
formState
:
store
.
formState
,
titleHtml
:
''
,
descriptionHtml
:
''
,
issuableRef
:
''
,
}),
},
},
}).
$mount
();
}).
$mount
();
});
});
...
...
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