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
f74c5aa4
Commit
f74c5aa4
authored
Feb 18, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
737f7be9
fe10964a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
9 deletions
+21
-9
app/assets/javascripts/diffs/components/diff_file.vue
app/assets/javascripts/diffs/components/diff_file.vue
+4
-5
app/assets/javascripts/diffs/store/actions.js
app/assets/javascripts/diffs/store/actions.js
+2
-0
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+1
-1
changelogs/unreleased/feature-gb-enable-ci-persisted-stages-by-default.yml
...ased/feature-gb-enable-ci-persisted-stages-by-default.yml
+5
-0
spec/javascripts/diffs/components/diff_file_spec.js
spec/javascripts/diffs/components/diff_file_spec.js
+2
-3
spec/javascripts/diffs/store/actions_spec.js
spec/javascripts/diffs/store/actions_spec.js
+7
-0
No files found.
app/assets/javascripts/diffs/components/diff_file.vue
View file @
f74c5aa4
...
@@ -35,7 +35,6 @@ export default {
...
@@ -35,7 +35,6 @@ export default {
isLoadingCollapsedDiff
:
false
,
isLoadingCollapsedDiff
:
false
,
forkMessageVisible
:
false
,
forkMessageVisible
:
false
,
isCollapsed
:
this
.
file
.
viewer
.
collapsed
||
false
,
isCollapsed
:
this
.
file
.
viewer
.
collapsed
||
false
,
renderIt
:
this
.
file
.
renderIt
,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -53,7 +52,7 @@ export default {
...
@@ -53,7 +52,7 @@ export default {
);
);
},
},
showLoadingIcon
()
{
showLoadingIcon
()
{
return
this
.
isLoadingCollapsedDiff
||
(
!
this
.
renderIt
&&
!
this
.
isCollapsed
);
return
this
.
isLoadingCollapsedDiff
||
(
!
this
.
file
.
renderIt
&&
!
this
.
isCollapsed
);
},
},
hasDiffLines
()
{
hasDiffLines
()
{
return
(
return
(
...
@@ -80,13 +79,13 @@ export default {
...
@@ -80,13 +79,13 @@ export default {
eventHub
.
$on
(
`loadCollapsedDiff/
${
this
.
file
.
file_hash
}
`
,
this
.
handleLoadCollapsedDiff
);
eventHub
.
$on
(
`loadCollapsedDiff/
${
this
.
file
.
file_hash
}
`
,
this
.
handleLoadCollapsedDiff
);
},
},
methods
:
{
methods
:
{
...
mapActions
(
'
diffs
'
,
[
'
loadCollapsedDiff
'
,
'
assignDiscussionsToDiff
'
]),
...
mapActions
(
'
diffs
'
,
[
'
loadCollapsedDiff
'
,
'
assignDiscussionsToDiff
'
,
'
setRenderIt
'
]),
handleToggle
()
{
handleToggle
()
{
if
(
!
this
.
hasDiffLines
)
{
if
(
!
this
.
hasDiffLines
)
{
this
.
handleLoadCollapsedDiff
();
this
.
handleLoadCollapsedDiff
();
}
else
{
}
else
{
this
.
isCollapsed
=
!
this
.
isCollapsed
;
this
.
isCollapsed
=
!
this
.
isCollapsed
;
this
.
renderIt
=
true
;
this
.
setRenderIt
(
this
.
file
)
;
}
}
},
},
handleLoadCollapsedDiff
()
{
handleLoadCollapsedDiff
()
{
...
@@ -96,7 +95,7 @@ export default {
...
@@ -96,7 +95,7 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
this
.
isLoadingCollapsedDiff
=
false
;
this
.
isLoadingCollapsedDiff
=
false
;
this
.
isCollapsed
=
false
;
this
.
isCollapsed
=
false
;
this
.
renderIt
=
true
;
this
.
setRenderIt
(
this
.
file
)
;
})
})
.
then
(()
=>
{
.
then
(()
=>
{
requestIdleCallback
(
requestIdleCallback
(
...
...
app/assets/javascripts/diffs/store/actions.js
View file @
f74c5aa4
...
@@ -131,6 +131,8 @@ export const startRenderDiffsQueue = ({ state, commit }) => {
...
@@ -131,6 +131,8 @@ export const startRenderDiffsQueue = ({ state, commit }) => {
return
checkItem
();
return
checkItem
();
};
};
export
const
setRenderIt
=
({
commit
},
file
)
=>
commit
(
types
.
RENDER_FILE
,
file
);
export
const
setInlineDiffViewType
=
({
commit
})
=>
{
export
const
setInlineDiffViewType
=
({
commit
})
=>
{
commit
(
types
.
SET_DIFF_VIEW_TYPE
,
INLINE_DIFF_VIEW_TYPE
);
commit
(
types
.
SET_DIFF_VIEW_TYPE
,
INLINE_DIFF_VIEW_TYPE
);
...
...
app/models/ci/pipeline.rb
View file @
f74c5aa4
...
@@ -315,7 +315,7 @@ module Ci
...
@@ -315,7 +315,7 @@ module Ci
def
ordered_stages
def
ordered_stages
return
legacy_stages
unless
complete?
return
legacy_stages
unless
complete?
if
Feature
.
enabled?
(
'ci_pipeline_persisted_stages'
)
if
Feature
.
enabled?
(
'ci_pipeline_persisted_stages'
,
default_enabled:
true
)
stages
stages
else
else
legacy_stages
legacy_stages
...
...
changelogs/unreleased/feature-gb-enable-ci-persisted-stages-by-default.yml
0 → 100644
View file @
f74c5aa4
---
title
:
Enable persisted pipeline stages by default
merge_request
:
25347
author
:
type
:
performance
spec/javascripts/diffs/components/diff_file_spec.js
View file @
f74c5aa4
...
@@ -28,8 +28,7 @@ describe('DiffFile', () => {
...
@@ -28,8 +28,7 @@ describe('DiffFile', () => {
expect
(
el
.
querySelector
(
'
.file-title-name
'
).
innerText
.
indexOf
(
file_path
)).
toBeGreaterThan
(
-
1
);
expect
(
el
.
querySelector
(
'
.file-title-name
'
).
innerText
.
indexOf
(
file_path
)).
toBeGreaterThan
(
-
1
);
expect
(
el
.
querySelector
(
'
.js-syntax-highlight
'
)).
toBeDefined
();
expect
(
el
.
querySelector
(
'
.js-syntax-highlight
'
)).
toBeDefined
();
expect
(
vm
.
renderIt
).
toEqual
(
false
);
vm
.
file
.
renderIt
=
true
;
vm
.
renderIt
=
true
;
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
el
.
querySelectorAll
(
'
.line_content
'
).
length
).
toBeGreaterThan
(
5
);
expect
(
el
.
querySelectorAll
(
'
.line_content
'
).
length
).
toBeGreaterThan
(
5
);
...
@@ -41,7 +40,7 @@ describe('DiffFile', () => {
...
@@ -41,7 +40,7 @@ describe('DiffFile', () => {
expect
(
vm
.
$el
.
querySelectorAll
(
'
.diff-content
'
).
length
).
toEqual
(
1
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
.diff-content
'
).
length
).
toEqual
(
1
);
expect
(
vm
.
isCollapsed
).
toEqual
(
false
);
expect
(
vm
.
isCollapsed
).
toEqual
(
false
);
vm
.
isCollapsed
=
true
;
vm
.
isCollapsed
=
true
;
vm
.
renderIt
=
true
;
vm
.
file
.
renderIt
=
true
;
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelectorAll
(
'
.diff-content
'
).
length
).
toEqual
(
0
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
.diff-content
'
).
length
).
toEqual
(
0
);
...
...
spec/javascripts/diffs/store/actions_spec.js
View file @
f74c5aa4
...
@@ -29,6 +29,7 @@ import actions, {
...
@@ -29,6 +29,7 @@ import actions, {
renderFileForDiscussionId
,
renderFileForDiscussionId
,
setRenderTreeList
,
setRenderTreeList
,
setShowWhitespace
,
setShowWhitespace
,
setRenderIt
,
}
from
'
~/diffs/store/actions
'
;
}
from
'
~/diffs/store/actions
'
;
import
eventHub
from
'
~/notes/event_hub
'
;
import
eventHub
from
'
~/notes/event_hub
'
;
import
*
as
types
from
'
~/diffs/store/mutation_types
'
;
import
*
as
types
from
'
~/diffs/store/mutation_types
'
;
...
@@ -855,4 +856,10 @@ describe('DiffsStoreActions', () => {
...
@@ -855,4 +856,10 @@ describe('DiffsStoreActions', () => {
expect
(
window
.
history
.
pushState
).
toHaveBeenCalled
();
expect
(
window
.
history
.
pushState
).
toHaveBeenCalled
();
});
});
});
});
describe
(
'
setRenderIt
'
,
()
=>
{
it
(
'
commits RENDER_FILE
'
,
done
=>
{
testAction
(
setRenderIt
,
'
file
'
,
{},
[{
type
:
types
.
RENDER_FILE
,
payload
:
'
file
'
}],
[],
done
);
});
});
});
});
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