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
7867faa3
Commit
7867faa3
authored
Nov 24, 2021
by
Heinrich Lee Yu
Committed by
David O'Regan
Nov 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix position of loading indicator for issue notes
parent
b0004fab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
0 deletions
+35
-0
app/assets/javascripts/notes/components/notes_app.vue
app/assets/javascripts/notes/components/notes_app.vue
+4
-0
spec/frontend/notes/components/__snapshots__/notes_app_spec.js.snap
...end/notes/components/__snapshots__/notes_app_spec.js.snap
+17
-0
spec/frontend/notes/components/notes_app_spec.js
spec/frontend/notes/components/notes_app_spec.js
+14
-0
No files found.
app/assets/javascripts/notes/components/notes_app.vue
View file @
7867faa3
...
...
@@ -104,6 +104,10 @@ export default {
});
}
if
(
this
.
sortDirDesc
)
{
return
skeletonNotes
.
concat
(
this
.
discussions
);
}
return
this
.
discussions
.
concat
(
skeletonNotes
);
},
canReply
()
{
...
...
spec/frontend/notes/components/__snapshots__/notes_app_spec.js.snap
0 → 100644
View file @
7867faa3
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`note_app when sort direction is asc shows skeleton notes after the loaded discussions 1`] = `
"<ul id=\\"notes-list\\" class=\\"notes main-notes-list timeline\\">
<noteable-discussion-stub discussion=\\"[object Object]\\" renderdifffile=\\"true\\" helppagepath=\\"\\" isoverviewtab=\\"true\\"></noteable-discussion-stub>
<skeleton-loading-container-stub></skeleton-loading-container-stub>
<discussion-filter-note-stub style=\\"display: none;\\"></discussion-filter-note-stub>
</ul>"
`;
exports[`note_app when sort direction is desc shows skeleton notes before the loaded discussions 1`] = `
"<ul id=\\"notes-list\\" class=\\"notes main-notes-list timeline\\">
<skeleton-loading-container-stub></skeleton-loading-container-stub>
<noteable-discussion-stub discussion=\\"[object Object]\\" renderdifffile=\\"true\\" helppagepath=\\"\\" isoverviewtab=\\"true\\"></noteable-discussion-stub>
<discussion-filter-note-stub style=\\"display: none;\\"></discussion-filter-note-stub>
</ul>"
`;
spec/frontend/notes/components/notes_app_spec.js
View file @
7867faa3
...
...
@@ -374,6 +374,9 @@ describe('note_app', () => {
beforeEach
(()
=>
{
store
=
createStore
();
store
.
state
.
discussionSortOrder
=
constants
.
DESC
;
store
.
state
.
isLoading
=
true
;
store
.
state
.
discussions
=
[
mockData
.
discussionMock
];
wrapper
=
shallowMount
(
NotesApp
,
{
propsData
,
store
,
...
...
@@ -386,11 +389,18 @@ describe('note_app', () => {
it
(
'
finds CommentForm before notes list
'
,
()
=>
{
expect
(
getComponentOrder
()).
toStrictEqual
([
TYPE_COMMENT_FORM
,
TYPE_NOTES_LIST
]);
});
it
(
'
shows skeleton notes before the loaded discussions
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
#notes-list
'
).
html
()).
toMatchSnapshot
();
});
});
describe
(
'
when sort direction is asc
'
,
()
=>
{
beforeEach
(()
=>
{
store
=
createStore
();
store
.
state
.
isLoading
=
true
;
store
.
state
.
discussions
=
[
mockData
.
discussionMock
];
wrapper
=
shallowMount
(
NotesApp
,
{
propsData
,
store
,
...
...
@@ -403,6 +413,10 @@ describe('note_app', () => {
it
(
'
finds CommentForm after notes list
'
,
()
=>
{
expect
(
getComponentOrder
()).
toStrictEqual
([
TYPE_NOTES_LIST
,
TYPE_COMMENT_FORM
]);
});
it
(
'
shows skeleton notes after the loaded discussions
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
#notes-list
'
).
html
()).
toMatchSnapshot
();
});
});
describe
(
'
when multiple draft types are present
'
,
()
=>
{
...
...
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