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
52cf955b
Commit
52cf955b
authored
Oct 10, 2018
by
André Luís
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve MR file tree on small screens
parent
8f13e071
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
4 deletions
+34
-4
app/assets/javascripts/diffs/store/modules/diff_state.js
app/assets/javascripts/diffs/store/modules/diff_state.js
+3
-1
app/assets/stylesheets/framework/mixins.scss
app/assets/stylesheets/framework/mixins.scss
+9
-0
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+16
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+1
-3
changelogs/unreleased/52361-fix-file-tree-mobile.yml
changelogs/unreleased/52361-fix-file-tree-mobile.yml
+5
-0
No files found.
app/assets/javascripts/diffs/store/modules/diff_state.js
View file @
52cf955b
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
import
{
getParameterValues
}
from
'
~/lib/utils/url_utility
'
;
import
{
getParameterValues
}
from
'
~/lib/utils/url_utility
'
;
import
bp
from
'
~/breakpoints
'
;
import
{
INLINE_DIFF_VIEW_TYPE
,
DIFF_VIEW_COOKIE_NAME
,
MR_TREE_SHOW_KEY
}
from
'
../../constants
'
;
import
{
INLINE_DIFF_VIEW_TYPE
,
DIFF_VIEW_COOKIE_NAME
,
MR_TREE_SHOW_KEY
}
from
'
../../constants
'
;
const
viewTypeFromQueryString
=
getParameterValues
(
'
view
'
)[
0
];
const
viewTypeFromQueryString
=
getParameterValues
(
'
view
'
)[
0
];
...
@@ -20,6 +21,7 @@ export default () => ({
...
@@ -20,6 +21,7 @@ export default () => ({
diffViewType
:
viewTypeFromQueryString
||
viewTypeFromCookie
||
defaultViewType
,
diffViewType
:
viewTypeFromQueryString
||
viewTypeFromCookie
||
defaultViewType
,
tree
:
[],
tree
:
[],
treeEntries
:
{},
treeEntries
:
{},
showTreeList
:
storedTreeShow
===
null
?
true
:
storedTreeShow
===
'
true
'
,
showTreeList
:
storedTreeShow
===
null
?
bp
.
getBreakpointSize
()
!==
'
xs
'
:
storedTreeShow
===
'
true
'
,
currentDiffFileId
:
''
,
currentDiffFileId
:
''
,
});
});
app/assets/stylesheets/framework/mixins.scss
View file @
52cf955b
...
@@ -12,6 +12,15 @@
...
@@ -12,6 +12,15 @@
max-width
:
$max-width
;
max-width
:
$max-width
;
}
}
/**
* Mixin for fixed width container
*/
@mixin
fixed-width-container
{
max-width
:
$limited-layout-width
-
(
$gl-padding
*
2
);
margin-left
:
auto
;
margin-right
:
auto
;
}
/*
/*
* Mixin for markdown tables
* Mixin for markdown tables
*/
*/
...
...
app/assets/stylesheets/pages/diff.scss
View file @
52cf955b
...
@@ -1046,3 +1046,19 @@
...
@@ -1046,3 +1046,19 @@
left
:
auto
;
left
:
auto
;
line-height
:
0
;
line-height
:
0
;
}
}
@media
(
max-width
:
map-get
(
$grid-breakpoints
,
md
)
-1
)
{
.diffs
.files
{
@include
fixed-width-container
;
flex-direction
:
column
;
.diff-tree-list
{
width
:
100%
;
}
.tree-list-holder
{
max-height
:
calc
(
50px
+
50vh
);
padding-right
:
0
;
}
}
}
app/assets/stylesheets/pages/issuable.scss
View file @
52cf955b
// Limit MR description for side-by-side diff view
// Limit MR description for side-by-side diff view
.fixed-width-container
{
.fixed-width-container
{
max-width
:
$limited-layout-width
-
(
$gl-padding
*
2
);
@include
fixed-width-container
;
margin-left
:
auto
;
margin-right
:
auto
;
}
}
.issuable-warning-icon
{
.issuable-warning-icon
{
...
...
changelogs/unreleased/52361-fix-file-tree-mobile.yml
0 → 100644
View file @
52cf955b
---
title
:
Improve MR file tree in smaller screens
merge_request
:
22273
author
:
type
:
fixed
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