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
7e69d614
Commit
7e69d614
authored
Jul 09, 2020
by
André Luís
Committed by
André Luís
Jul 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep large spinner while MR file tree is loading
parent
6b120d08
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
2 deletions
+19
-2
app/assets/javascripts/diffs/components/app.vue
app/assets/javascripts/diffs/components/app.vue
+8
-2
app/assets/javascripts/diffs/store/modules/diff_state.js
app/assets/javascripts/diffs/store/modules/diff_state.js
+1
-0
app/assets/javascripts/diffs/store/mutations.js
app/assets/javascripts/diffs/store/mutations.js
+1
-0
changelogs/unreleased/227588-add-loading-to-mr-tree.yml
changelogs/unreleased/227588-add-loading-to-mr-tree.yml
+5
-0
spec/frontend/diffs/components/app_spec.js
spec/frontend/diffs/components/app_spec.js
+1
-0
spec/frontend/diffs/components/tree_list_spec.js
spec/frontend/diffs/components/tree_list_spec.js
+1
-0
spec/frontend/diffs/store/mutations_spec.js
spec/frontend/diffs/store/mutations_spec.js
+2
-0
No files found.
app/assets/javascripts/diffs/components/app.vue
View file @
7e69d614
...
...
@@ -127,7 +127,13 @@ export default {
emailPatchPath
:
state
=>
state
.
diffs
.
emailPatchPath
,
retrievingBatches
:
state
=>
state
.
diffs
.
retrievingBatches
,
}),
...
mapState
(
'
diffs
'
,
[
'
showTreeList
'
,
'
isLoading
'
,
'
startVersion
'
,
'
currentDiffFileId
'
]),
...
mapState
(
'
diffs
'
,
[
'
showTreeList
'
,
'
isLoading
'
,
'
startVersion
'
,
'
currentDiffFileId
'
,
'
isTreeLoaded
'
,
]),
...
mapGetters
(
'
diffs
'
,
[
'
isParallelView
'
,
'
currentDiffIndex
'
]),
...
mapGetters
([
'
isNotesFetched
'
,
'
getNoteableData
'
]),
diffs
()
{
...
...
@@ -400,7 +406,7 @@ export default {
<
template
>
<div
v-show=
"shouldShow"
>
<div
v-if=
"isLoading"
class=
"loading"
><gl-loading-icon
size=
"lg"
/></div>
<div
v-if=
"isLoading
|| !isTreeLoaded
"
class=
"loading"
><gl-loading-icon
size=
"lg"
/></div>
<div
v-else
id=
"diffs"
:class=
"
{ active: shouldShow }" class="diffs tab-pane">
<compare-versions
:merge-request-diffs=
"mergeRequestDiffs"
...
...
app/assets/javascripts/diffs/store/modules/diff_state.js
View file @
7e69d614
...
...
@@ -15,6 +15,7 @@ const whiteSpaceFromCookie = Cookies.get(DIFF_WHITESPACE_COOKIE_NAME);
export
default
()
=>
({
isLoading
:
true
,
isTreeLoaded
:
false
,
isBatchLoading
:
false
,
retrievingBatches
:
false
,
addedLines
:
null
,
...
...
app/assets/javascripts/diffs/store/mutations.js
View file @
7e69d614
...
...
@@ -323,6 +323,7 @@ export default {
[
types
.
SET_TREE_DATA
](
state
,
{
treeEntries
,
tree
})
{
state
.
treeEntries
=
treeEntries
;
state
.
tree
=
tree
;
state
.
isTreeLoaded
=
true
;
},
[
types
.
SET_RENDER_TREE_LIST
](
state
,
renderTreeList
)
{
state
.
renderTreeList
=
renderTreeList
;
...
...
changelogs/unreleased/227588-add-loading-to-mr-tree.yml
0 → 100644
View file @
7e69d614
---
title
:
Keep large spinner while MR file tree is loading
merge_request
:
36446
author
:
type
:
fixed
spec/frontend/diffs/components/app_spec.js
View file @
7e69d614
...
...
@@ -41,6 +41,7 @@ describe('diffs/components/app', () => {
store
=
createDiffsStore
();
store
.
state
.
diffs
.
isLoading
=
false
;
store
.
state
.
diffs
.
isTreeLoaded
=
true
;
extendStore
(
store
);
...
...
spec/frontend/diffs/components/tree_list_spec.js
View file @
7e69d614
...
...
@@ -17,6 +17,7 @@ describe('Diffs tree list component', () => {
});
// Setup initial state
store
.
state
.
diffs
.
isTreeLoaded
=
true
;
store
.
state
.
diffs
.
diffFiles
.
push
(
'
test
'
);
store
.
state
.
diffs
=
{
addedLines
:
10
,
...
...
spec/frontend/diffs/store/mutations_spec.js
View file @
7e69d614
...
...
@@ -830,6 +830,7 @@ describe('DiffsStoreMutations', () => {
const
state
=
{
treeEntries
:
{},
tree
:
[],
isTreeLoaded
:
false
,
};
mutations
[
types
.
SET_TREE_DATA
](
state
,
{
...
...
@@ -844,6 +845,7 @@ describe('DiffsStoreMutations', () => {
});
expect
(
state
.
tree
).
toEqual
([
'
tree
'
]);
expect
(
state
.
isTreeLoaded
).
toEqual
(
true
);
});
});
...
...
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