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
32e3f13f
Commit
32e3f13f
authored
Apr 08, 2021
by
Tomas Vik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MR diff file tree being hidden behind review bar
parent
a9f60785
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
16 deletions
+46
-16
app/assets/javascripts/diffs/components/app.vue
app/assets/javascripts/diffs/components/app.vue
+2
-0
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+1
-0
app/assets/stylesheets/page_bundles/merge_requests.scss
app/assets/stylesheets/page_bundles/merge_requests.scss
+17
-16
changelogs/unreleased/288343-show-full-treeview.yml
changelogs/unreleased/288343-show-full-treeview.yml
+4
-0
spec/frontend/diffs/components/app_spec.js
spec/frontend/diffs/components/app_spec.js
+20
-0
spec/frontend/diffs/create_diffs_store.js
spec/frontend/diffs/create_diffs_store.js
+2
-0
No files found.
app/assets/javascripts/diffs/components/app.vue
View file @
32e3f13f
...
...
@@ -185,6 +185,7 @@ export default {
'
mrReviews
'
,
]),
...
mapGetters
(
'
diffs
'
,
[
'
whichCollapsedTypes
'
,
'
isParallelView
'
,
'
currentDiffIndex
'
]),
...
mapGetters
(
'
batchComments
'
,
[
'
draftsCount
'
]),
...
mapGetters
([
'
isNotesFetched
'
,
'
getNoteableData
'
]),
diffs
()
{
if
(
!
this
.
viewDiffsFileByFile
)
{
...
...
@@ -500,6 +501,7 @@ export default {
<div
v-if=
"renderFileTree"
:style=
"
{ width: `${treeWidth}px` }"
:class="{ 'review-bar-visible': draftsCount > 0 }"
class="diff-tree-list js-diff-tree-list px-3 pr-md-0"
>
<panel-resizer
...
...
app/assets/stylesheets/framework/variables.scss
View file @
32e3f13f
...
...
@@ -929,6 +929,7 @@ Merge requests
$mr-tabs-height
:
48px
;
$mr-version-controls-height
:
56px
;
$mr-widget-margin-left
:
40px
;
$mr-review-bar-height
:
calc
(
2rem
+
13px
);
/*
Compare Branches
...
...
app/assets/stylesheets/page_bundles/merge_requests.scss
View file @
32e3f13f
...
...
@@ -9,6 +9,18 @@
min-width
:
0
;
}
.with-system-header
{
--system-header-height
:
#{
$system-header-height
}
;
}
.with-performance-bar
{
--performance-bar-height
:
#{
$performance-bar-height
}
;
}
.review-bar-visible
{
--review-bar-height
:
#{
$mr-review-bar-height
}
;
}
.diff-tree-list
{
// This 11px value should match the additional value found in
// /assets/stylesheets/framework/diffs.scss
...
...
@@ -23,24 +35,13 @@
position
:
-
webkit-sticky
;
position
:
sticky
;
top
:
$top-pos
;
max-height
:
calc
(
100vh
-
#{
$top-pos
}
);
// Unitless zero values are not allowed in calculations https://stackoverflow.com/a/55391061
// stylelint-disable-next-line length-zero-no-unit
top
:
calc
(
#{
$top-pos
}
+
var
(
--
system-header-height
,
0px
)
+
var
(
--
performance-bar-height
,
0px
));
// stylelint-disable-next-line length-zero-no-unit
max-height
:
calc
(
100vh
-
#{
$top-pos
}
-
var
(
--
system-header-height
,
0px
)
-
var
(
--
performance-bar-height
,
0px
)
-
var
(
--
review-bar-height
,
0px
));
z-index
:
202
;
.with-system-header
&
{
top
:
$top-pos
+
$system-header-height
;
}
.with-system-header.with-performance-bar
&
{
top
:
$top-pos
+
$system-header-height
+
$performance-bar-height
;
}
.with-performance-bar
&
{
$performance-bar-top-pos
:
$performance-bar-height
+
$top-pos
;
top
:
$performance-bar-top-pos
;
max-height
:
calc
(
100vh
-
#{
$performance-bar-top-pos
}
);
}
.drag-handle
{
bottom
:
16px
;
transform
:
translateX
(
10px
);
...
...
changelogs/unreleased/288343-show-full-treeview.yml
0 → 100644
View file @
32e3f13f
---
title
:
Fix MR diff file tree being hidden behind review bar
merge_request
:
59150
type
:
fixed
spec/frontend/diffs/components/app_spec.js
View file @
32e3f13f
...
...
@@ -705,4 +705,24 @@ describe('diffs/components/app', () => {
);
});
});
describe
(
'
diff file tree is aware of review bar
'
,
()
=>
{
it
(
'
it does not have review-bar-visible class when review bar is not visible
'
,
()
=>
{
createComponent
({},
({
state
})
=>
{
state
.
diffs
.
diffFiles
=
[{
file_hash
:
'
111
'
,
file_path
:
'
111.js
'
}];
});
expect
(
wrapper
.
find
(
'
.js-diff-tree-list
'
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
'
.js-diff-tree-list.review-bar-visible
'
).
exists
()).
toBe
(
false
);
});
it
(
'
it does have review-bar-visible class when review bar is visible
'
,
()
=>
{
createComponent
({},
({
state
})
=>
{
state
.
diffs
.
diffFiles
=
[{
file_hash
:
'
111
'
,
file_path
:
'
111.js
'
}];
state
.
batchComments
.
drafts
=
[
'
draft message
'
];
});
expect
(
wrapper
.
find
(
'
.js-diff-tree-list.review-bar-visible
'
).
exists
()).
toBe
(
true
);
});
});
});
spec/frontend/diffs/create_diffs_store.js
View file @
32e3f13f
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
batchCommentsModule
from
'
~/batch_comments/stores/modules/batch_comments
'
;
import
diffsModule
from
'
~/diffs/store/modules
'
;
import
notesModule
from
'
~/notes/stores/modules
'
;
...
...
@@ -10,6 +11,7 @@ export default function createDiffsStore() {
modules
:
{
diffs
:
diffsModule
(),
notes
:
notesModule
(),
batchComments
:
batchCommentsModule
(),
},
});
}
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