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
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 {
elementType
()
{
return
this
.
showForm
?
'
form
'
:
'
div
'
;
},
formState
()
{
return
this
.
store
.
formState
;
},
},
components
:
{
descriptionComponent
,
...
...
@@ -142,7 +145,7 @@ export default {
<
template
>
<div
:is=
"elementType"
>
<title-component
:
store=
"stor
e"
:
form-state=
"formStat
e"
:show-form=
"showForm"
:issuable-ref=
"issuableRef"
:title-html=
"state.titleHtml"
...
...
app/assets/javascripts/issue_show/components/fields/title.vue
View file @
36df19e7
<
script
>
export
default
{
props
:
{
stor
e
:
{
formStat
e
:
{
type
:
Object
,
required
:
true
,
},
},
data
()
{
return
{
state
:
this
.
store
.
formState
,
};
},
};
</
script
>
...
...
@@ -27,6 +22,6 @@
type=
"text"
placeholder=
"Issue title"
aria-label=
"Issue title"
v-model=
"
s
tate.title"
/>
v-model=
"
formS
tate.title"
/>
</fieldset>
</
template
>
app/assets/javascripts/issue_show/components/title.vue
View file @
36df19e7
...
...
@@ -27,7 +27,7 @@
type
:
String
,
required
:
true
,
},
stor
e
:
{
formStat
e
:
{
type
:
Object
,
required
:
true
,
},
...
...
@@ -56,7 +56,7 @@
<div>
<title-field
v-if=
"showForm"
:
store=
"stor
e"
/>
:
form-state=
"formStat
e"
/>
<h2
v-else
class=
"title"
...
...
spec/javascripts/issue_show/components/fields/title_spec.js
View file @
36df19e7
...
...
@@ -17,7 +17,7 @@ describe('Title field component', () => {
vm
=
new
Component
({
propsData
:
{
stor
e
,
formState
:
store
.
formStat
e
,
},
}).
$mount
();
});
...
...
spec/javascripts/issue_show/components/title_spec.js
View file @
36df19e7
...
...
@@ -7,17 +7,18 @@ describe('Title component', () => {
beforeEach
(()
=>
{
const
Component
=
Vue
.
extend
(
titleComponent
);
const
store
=
new
Store
({
titleHtml
:
''
,
descriptionHtml
:
''
,
issuableRef
:
''
,
});
vm
=
new
Component
({
propsData
:
{
issuableRef
:
'
#1
'
,
titleHtml
:
'
Testing <img />
'
,
titleText
:
'
Testing
'
,
showForm
:
false
,
store
:
new
Store
({
titleHtml
:
''
,
descriptionHtml
:
''
,
issuableRef
:
''
,
}),
formState
:
store
.
formState
,
},
}).
$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