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
04f20f75
Commit
04f20f75
authored
Sep 07, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed image discussions not showing on the changes tab
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/225922
parent
576beef1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
app/assets/javascripts/diffs/store/mutations.js
app/assets/javascripts/diffs/store/mutations.js
+1
-1
changelogs/unreleased/ph-225922-fixedImageDiscussionsNotShowingOnChangesTab.yml
...ph-225922-fixedImageDiscussionsNotShowingOnChangesTab.yml
+5
-0
spec/frontend/diffs/store/mutations_spec.js
spec/frontend/diffs/store/mutations_spec.js
+30
-0
No files found.
app/assets/javascripts/diffs/store/mutations.js
View file @
04f20f75
...
...
@@ -248,7 +248,7 @@ export default {
});
}
if
(
!
file
.
parallel_diff_lines
||
!
file
.
highlighted_diff_lines
)
{
if
(
!
file
.
parallel_diff_lines
.
length
||
!
file
.
highlighted_diff_lines
.
length
)
{
const
newDiscussions
=
(
file
.
discussions
||
[])
.
filter
(
d
=>
d
.
id
!==
discussion
.
id
)
.
concat
(
discussion
);
...
...
changelogs/unreleased/ph-225922-fixedImageDiscussionsNotShowingOnChangesTab.yml
0 → 100644
View file @
04f20f75
---
title
:
Fixed image comments not showing on the changes tab
merge_request
:
author
:
type
:
fixed
spec/frontend/diffs/store/mutations_spec.js
View file @
04f20f75
...
...
@@ -645,6 +645,36 @@ describe('DiffsStoreMutations', () => {
expect
(
state
.
diffFiles
[
0
].
highlighted_diff_lines
[
0
].
discussions
).
toHaveLength
(
1
);
expect
(
state
.
diffFiles
[
0
].
highlighted_diff_lines
[
0
].
discussions
[
0
].
id
).
toBe
(
1
);
});
it
(
'
should add discussion to file
'
,
()
=>
{
const
state
=
{
latestDiff
:
true
,
diffFiles
:
[
{
file_hash
:
'
ABC
'
,
discussions
:
[],
parallel_diff_lines
:
[],
highlighted_diff_lines
:
[],
},
],
};
const
discussion
=
{
id
:
1
,
line_code
:
'
ABC_1
'
,
diff_discussion
:
true
,
resolvable
:
true
,
diff_file
:
{
file_hash
:
state
.
diffFiles
[
0
].
file_hash
,
},
};
mutations
[
types
.
SET_LINE_DISCUSSIONS_FOR_FILE
](
state
,
{
discussion
,
diffPositionByLineCode
:
null
,
});
expect
(
state
.
diffFiles
[
0
].
discussions
.
length
).
toEqual
(
1
);
});
});
describe
(
'
REMOVE_LINE_DISCUSSIONS
'
,
()
=>
{
...
...
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