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
f3f81c3c
Commit
f3f81c3c
authored
Mar 05, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move WorkInProgress vue component
parent
08083f43
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
42 deletions
+56
-42
app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
...rge_request_widget/components/states/work_in_progress.vue
+44
-35
app/assets/javascripts/vue_merge_request_widget/dependencies.js
...sets/javascripts/vue_merge_request_widget/dependencies.js
+1
-1
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
...javascripts/vue_merge_request_widget/mr_widget_options.js
+2
-2
changelogs/unreleased/refactor-move-mr-widget-wip-vue-component.yml
.../unreleased/refactor-move-mr-widget-wip-vue-component.yml
+5
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js
...pts/vue_mr_widget/components/states/mr_widget_wip_spec.js
+4
-4
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/
mr_widget_wip.js
→
app/assets/javascripts/vue_merge_request_widget/components/states/
work_in_progress.vue
View file @
f3f81c3c
<
script
>
import
$
from
'
jquery
'
;
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
eventHub
from
'
../../event_hub
'
;
export
default
{
name
:
'
MRWidgetWIP
'
,
props
:
{
mr
:
{
type
:
Object
,
required
:
true
},
service
:
{
type
:
Object
,
required
:
true
},
name
:
'
WorkInProgress
'
,
components
:
{
statusIcon
,
},
directives
:
{
tooltip
,
},
props
:
{
mr
:
{
type
:
Object
,
required
:
true
},
service
:
{
type
:
Object
,
required
:
true
},
},
data
()
{
return
{
isMakingRequest
:
false
,
};
},
components
:
{
statusIcon
,
},
methods
:
{
removeWIP
()
{
this
.
isMakingRequest
=
true
;
...
...
@@ -36,17 +37,25 @@ export default {
});
},
},
template
:
`
};
</
script
>
<
template
>
<div
class=
"mr-widget-body media"
>
<status-icon status="warning" :show-disabled-button="Boolean(mr.removeWIPPath)" />
<status-icon
status=
"warning"
:show-disabled-button=
"Boolean(mr.removeWIPPath)"
/>
<div
class=
"media-body space-children"
>
<span
class=
"bold"
>
This is a Work in Progress
<i
v-tooltip
class=
"fa fa-question-circle"
title="When this merge request is ready, remove the WIP: prefix from the title to allow it to be merged"
aria-label="When this merge request is ready, remove the WIP: prefix from the title to allow it to be merged">
title=
"When this merge request is ready,
remove the WIP: prefix from the title to allow it to be merged"
aria-label=
"When this merge request is ready,
remove the WIP: prefix from the title to allow it to be merged"
>
</i>
</span>
<button
...
...
@@ -58,10 +67,10 @@ export default {
<i
v-if=
"isMakingRequest"
class=
"fa fa-spinner fa-spin"
aria-hidden="true" />
aria-hidden=
"true"
>
</i>
Resolve WIP status
</button>
</div>
</div>
`
,
};
</
template
>
app/assets/javascripts/vue_merge_request_widget/dependencies.js
View file @
f3f81c3c
...
...
@@ -21,7 +21,7 @@ export { default as MergedState } from './components/states/mr_widget_merged.vue
export
{
default
as
FailedToMerge
}
from
'
./components/states/mr_widget_failed_to_merge.vue
'
;
export
{
default
as
ClosedState
}
from
'
./components/states/mr_widget_closed.vue
'
;
export
{
default
as
MergingState
}
from
'
./components/states/mr_widget_merging.vue
'
;
export
{
default
as
W
ipState
}
from
'
./components/states/mr_widget_wip
'
;
export
{
default
as
W
orkInProgressState
}
from
'
./components/states/work_in_progress.vue
'
;
export
{
default
as
ArchivedState
}
from
'
./components/states/mr_widget_archived.vue
'
;
export
{
default
as
ConflictsState
}
from
'
./components/states/mr_widget_conflicts.vue
'
;
export
{
default
as
NothingToMergeState
}
from
'
./components/states/nothing_to_merge.vue
'
;
...
...
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
View file @
f3f81c3c
...
...
@@ -12,7 +12,7 @@ import {
ClosedState
,
MergingState
,
RebaseState
,
W
ip
State
,
W
orkInProgress
State
,
ArchivedState
,
ConflictsState
,
NothingToMergeState
,
...
...
@@ -220,7 +220,7 @@ export default {
'
mr-widget-closed
'
:
ClosedState
,
'
mr-widget-merging
'
:
MergingState
,
'
mr-widget-failed-to-merge
'
:
FailedToMerge
,
'
mr-widget-wip
'
:
W
ip
State
,
'
mr-widget-wip
'
:
W
orkInProgress
State
,
'
mr-widget-archived
'
:
ArchivedState
,
'
mr-widget-conflicts
'
:
ConflictsState
,
'
mr-widget-nothing-to-merge
'
:
NothingToMergeState
,
...
...
changelogs/unreleased/refactor-move-mr-widget-wip-vue-component.yml
0 → 100644
View file @
f3f81c3c
---
title
:
Move WorkInProgress vue component
merge_request
:
17536
author
:
George Tsiolis
type
:
performance
spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js
View file @
f3f81c3c
import
Vue
from
'
vue
'
;
import
wipComponent
from
'
~/vue_merge_request_widget/components/states/mr_widget_wip
'
;
import
WorkInProgress
from
'
~/vue_merge_request_widget/components/states/work_in_progress.vue
'
;
import
eventHub
from
'
~/vue_merge_request_widget/event_hub
'
;
const
createComponent
=
()
=>
{
const
Component
=
Vue
.
extend
(
wipComponent
);
const
Component
=
Vue
.
extend
(
WorkInProgress
);
const
mr
=
{
title
:
'
The best MR ever
'
,
removeWIPPath
:
'
/path/to/remove/wip
'
,
...
...
@@ -17,10 +17,10 @@ const createComponent = () => {
});
};
describe
(
'
MRWidgetWIP
'
,
()
=>
{
describe
(
'
Wip
'
,
()
=>
{
describe
(
'
props
'
,
()
=>
{
it
(
'
should have props
'
,
()
=>
{
const
{
mr
,
service
}
=
wipComponent
.
props
;
const
{
mr
,
service
}
=
WorkInProgress
.
props
;
expect
(
mr
.
type
instanceof
Object
).
toBeTruthy
();
expect
(
mr
.
required
).
toBeTruthy
();
...
...
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