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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
3e42a0c1
Commit
3e42a0c1
authored
Mar 04, 2019
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed force toggle .nav-sidebar on any click event
Added note describing expected behaviour
parent
d53005ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
app/assets/javascripts/contextual_sidebar.js
app/assets/javascripts/contextual_sidebar.js
+2
-10
app/assets/stylesheets/framework/contextual_sidebar.scss
app/assets/stylesheets/framework/contextual_sidebar.scss
+4
-1
No files found.
app/assets/javascripts/contextual_sidebar.js
View file @
3e42a0c1
...
...
@@ -26,14 +26,6 @@ export default class ContextualSidebar {
bindEvents
()
{
if
(
!
this
.
$sidebar
.
length
)
return
;
document
.
addEventListener
(
'
click
'
,
e
=>
{
if
(
!
e
.
target
.
closest
(
'
.nav-sidebar
'
)
&&
(
bp
.
getBreakpointSize
()
===
'
sm
'
||
bp
.
getBreakpointSize
()
===
'
md
'
)
)
{
this
.
toggleCollapsedSidebar
(
true
,
true
);
}
});
this
.
$openSidebar
.
on
(
'
click
'
,
()
=>
this
.
toggleSidebarNav
(
true
));
this
.
$closeSidebar
.
on
(
'
click
'
,
()
=>
this
.
toggleSidebarNav
(
false
));
this
.
$overlay
.
on
(
'
click
'
,
()
=>
this
.
toggleSidebarNav
(
false
));
...
...
@@ -49,9 +41,9 @@ export default class ContextualSidebar {
$
(
window
).
on
(
'
resize
'
,
()
=>
_
.
debounce
(
this
.
render
(),
100
));
}
// NOTE: at 1200px
sidebar should be in 'desktop' mode
// NOTE: at 1200px
nav sidebar should be in 'desktop mode' (not overlap the content)
// https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24555#note_134136110
// But
, current behaviour starts desktop mode at 1201px
// But
setting 'desktop mode' at 1200px will break spec/support/features/reportable_note_shared_examples.rb
// TODO: use the breakpoints from breakpoints.js once they have been updated for bootstrap 4
// See related issue and discussion: https://gitlab.com/gitlab-org/gitlab-ce/issues/56745
...
...
app/assets/stylesheets/framework/contextual_sidebar.scss
View file @
3e42a0c1
...
...
@@ -5,8 +5,11 @@
padding-left
:
$contextual-sidebar-collapsed-width
;
}
// NOTE: at 1200px nav sidebar should be in 'desktop mode' (not overlap the content)
// https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24555#note_134136110
// But setting 'desktop mode' at 1200px will break spec/support/features/reportable_note_shared_examples.rb
$desktop-nav-sidebar-breakpoint
:
1201px
;
@media
(
min-width
:
$desktop-nav-sidebar-breakpoint
)
{
padding-left
:
$contextual-sidebar-width
;
}
...
...
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