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
06c31e08
Commit
06c31e08
authored
Nov 20, 2020
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include the "resolve all container" height in contentTop
parent
37f11976
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+15
-6
No files found.
app/assets/javascripts/lib/utils/common_utils.js
View file @
06c31e08
...
...
@@ -218,26 +218,35 @@ export const isMetaKey = e => e.metaKey || e.ctrlKey || e.altKey || e.shiftKey;
export
const
isMetaClick
=
e
=>
e
.
metaKey
||
e
.
ctrlKey
||
e
.
which
===
2
;
export
const
contentTop
=
()
=>
{
const
isDesktop
=
breakpointInstance
.
isDesktop
();
const
heightCalculators
=
[
()
=>
$
(
'
#js-peek
'
).
outerHeight
(),
()
=>
$
(
'
.navbar-gitlab
'
).
outerHeight
(),
({
desktop
})
=>
{
let
size
=
0
;
if
(
!
desktop
)
{
size
=
document
.
querySelector
(
'
.line-resolve-all-container
'
).
offsetHeight
;
}
return
size
;
},
()
=>
$
(
'
.merge-request-tabs
'
).
outerHeight
(),
()
=>
$
(
'
.js-diff-files-changed
'
).
outerHeight
(),
()
=>
{
const
isDesktop
=
breakpointInstance
.
isDesktop
();
({
desktop
})
=>
{
const
diffsTabIsActive
=
window
.
mrTabs
?.
currentAction
===
'
diffs
'
;
let
size
;
if
(
isD
esktop
&&
diffsTabIsActive
)
{
if
(
d
esktop
&&
diffsTabIsActive
)
{
size
=
$
(
'
.diff-file .file-title-flex-parent:visible
'
).
outerHeight
();
}
return
size
;
},
()
=>
{
(
{
desktop
}
)
=>
{
let
size
;
if
(
breakpointInstance
.
isDesktop
()
)
{
if
(
desktop
)
{
size
=
$
(
'
.mr-version-controls
'
).
outerHeight
();
}
...
...
@@ -246,7 +255,7 @@ export const contentTop = () => {
];
return
heightCalculators
.
reduce
((
totalHeight
,
calculator
)
=>
{
return
totalHeight
+
(
calculator
()
||
0
);
return
totalHeight
+
(
calculator
(
{
desktop
:
isDesktop
}
)
||
0
);
},
0
);
};
...
...
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