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
fc35125e
Commit
fc35125e
authored
Apr 08, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed whitespace toggle not showing the correct diff
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/211585
parent
b924970a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
app/assets/javascripts/diffs/store/mutations.js
app/assets/javascripts/diffs/store/mutations.js
+1
-0
changelogs/unreleased/ph-211585-fixWhitespaceToggleNotShowingCorrectDiff.yml
...ed/ph-211585-fixWhitespaceToggleNotShowingCorrectDiff.yml
+5
-0
spec/frontend/diffs/store/mutations_spec.js
spec/frontend/diffs/store/mutations_spec.js
+2
-0
No files found.
app/assets/javascripts/diffs/store/mutations.js
View file @
fc35125e
...
@@ -326,6 +326,7 @@ export default {
...
@@ -326,6 +326,7 @@ export default {
},
},
[
types
.
SET_SHOW_WHITESPACE
](
state
,
showWhitespace
)
{
[
types
.
SET_SHOW_WHITESPACE
](
state
,
showWhitespace
)
{
state
.
showWhitespace
=
showWhitespace
;
state
.
showWhitespace
=
showWhitespace
;
state
.
diffFiles
=
[];
},
},
[
types
.
TOGGLE_FILE_FINDER_VISIBLE
](
state
,
visible
)
{
[
types
.
TOGGLE_FILE_FINDER_VISIBLE
](
state
,
visible
)
{
state
.
fileFinderVisible
=
visible
;
state
.
fileFinderVisible
=
visible
;
...
...
changelogs/unreleased/ph-211585-fixWhitespaceToggleNotShowingCorrectDiff.yml
0 → 100644
View file @
fc35125e
---
title
:
Fixed whitespace toggle not showing the correct diff
merge_request
:
author
:
type
:
fixed
spec/frontend/diffs/store/mutations_spec.js
View file @
fc35125e
...
@@ -796,11 +796,13 @@ describe('DiffsStoreMutations', () => {
...
@@ -796,11 +796,13 @@ describe('DiffsStoreMutations', () => {
it
(
'
sets showWhitespace
'
,
()
=>
{
it
(
'
sets showWhitespace
'
,
()
=>
{
const
state
=
{
const
state
=
{
showWhitespace
:
true
,
showWhitespace
:
true
,
diffFiles
:
[
'
test
'
],
};
};
mutations
[
types
.
SET_SHOW_WHITESPACE
](
state
,
false
);
mutations
[
types
.
SET_SHOW_WHITESPACE
](
state
,
false
);
expect
(
state
.
showWhitespace
).
toBe
(
false
);
expect
(
state
.
showWhitespace
).
toBe
(
false
);
expect
(
state
.
diffFiles
).
toEqual
([]);
});
});
});
});
...
...
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