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
06025e4a
Commit
06025e4a
authored
Sep 13, 2018
by
André Luís
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display click to expand on collapsed diffs
parent
71f3d485
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
app/assets/javascripts/diffs/components/diff_file.vue
app/assets/javascripts/diffs/components/diff_file.vue
+1
-1
changelogs/unreleased/7573-show-click-to-expand-on-not-rendered-diffs.yml
...eased/7573-show-click-to-expand-on-not-rendered-diffs.yml
+6
-0
spec/javascripts/diffs/components/diff_file_spec.js
spec/javascripts/diffs/components/diff_file_spec.js
+12
-0
No files found.
app/assets/javascripts/diffs/components/diff_file.vue
View file @
06025e4a
...
@@ -44,7 +44,7 @@ export default {
...
@@ -44,7 +44,7 @@ export default {
},
},
showExpandMessage
()
{
showExpandMessage
()
{
return
(
return
(
!
this
.
isCollapsed
&&
this
.
isCollapsed
||
!
this
.
file
.
highlightedDiffLines
&&
!
this
.
file
.
highlightedDiffLines
&&
!
this
.
isLoadingCollapsedDiff
&&
!
this
.
isLoadingCollapsedDiff
&&
!
this
.
file
.
tooLarge
&&
!
this
.
file
.
tooLarge
&&
...
...
changelogs/unreleased/7573-show-click-to-expand-on-not-rendered-diffs.yml
0 → 100644
View file @
06025e4a
---
title
:
Fix absent Click to Expand link on diffs not rendered on first load of Merge
Requests Changes tab
merge_request
:
21716
author
:
type
:
fixed
spec/javascripts/diffs/components/diff_file_spec.js
View file @
06025e4a
...
@@ -63,6 +63,18 @@ describe('DiffFile', () => {
...
@@ -63,6 +63,18 @@ describe('DiffFile', () => {
});
});
});
});
it
(
'
should have collapsed text and link even before rendered
'
,
done
=>
{
vm
.
file
.
renderIt
=
false
;
vm
.
file
.
collapsed
=
true
;
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
This diff is collapsed
'
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
.js-click-to-expand
'
).
length
).
toEqual
(
1
);
done
();
});
});
it
(
'
should have loading icon while loading a collapsed diffs
'
,
done
=>
{
it
(
'
should have loading icon while loading a collapsed diffs
'
,
done
=>
{
vm
.
file
.
collapsed
=
true
;
vm
.
file
.
collapsed
=
true
;
vm
.
isLoadingCollapsedDiff
=
true
;
vm
.
isLoadingCollapsedDiff
=
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