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
Jérome Perrin
gitlab-ce
Commits
a63b18b1
Commit
a63b18b1
authored
Apr 19, 2017
by
Jose Ivan Vargas Lopez
Committed by
Alfredo Sumaran
Apr 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the issuable sidebar to remain collapsed on mobile devices
parent
c57e66be
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
0 deletions
+30
-0
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+8
-0
changelogs/unreleased/right-sidebar-closed-default-mobile.yml
...gelogs/unreleased/right-sidebar-closed-default-mobile.yml
+4
-0
spec/features/issues/issue_sidebar_spec.rb
spec/features/issues/issue_sidebar_spec.rb
+14
-0
spec/support/mobile_helpers.rb
spec/support/mobile_helpers.rb
+4
-0
No files found.
app/assets/javascripts/main.js
View file @
a63b18b1
...
...
@@ -211,6 +211,14 @@ $(function () {
}
});
if
(
bootstrapBreakpoint
===
'
xs
'
)
{
const
$rightSidebar
=
$
(
'
aside.right-sidebar, .page-with-sidebar
'
);
$rightSidebar
.
removeClass
(
'
right-sidebar-expanded
'
)
.
addClass
(
'
right-sidebar-collapsed
'
);
}
// prevent default action for disabled buttons
$
(
'
.btn
'
).
click
(
function
(
e
)
{
if
(
$
(
this
).
hasClass
(
'
disabled
'
))
{
...
...
changelogs/unreleased/right-sidebar-closed-default-mobile.yml
0 → 100644
View file @
a63b18b1
---
title
:
Set the issuable sidebar to remain closed for mobile devices
merge_request
:
author
:
spec/features/issues/issue_sidebar_spec.rb
View file @
a63b18b1
...
...
@@ -120,6 +120,20 @@ feature 'Issue Sidebar', feature: true do
end
end
context
'as a allowed mobile user'
,
js:
true
do
before
do
project
.
team
<<
[
user
,
:developer
]
resize_screen_xs
visit_issue
(
project
,
issue
)
end
context
'mobile sidebar'
do
it
'collapses the sidebar for small screens'
do
expect
(
page
).
not_to
have_css
(
'aside.right-sidebar.right-sidebar-collapsed'
)
end
end
end
context
'as a guest'
do
before
do
project
.
team
<<
[
user
,
:guest
]
...
...
spec/support/mobile_helpers.rb
View file @
a63b18b1
module
MobileHelpers
def
resize_screen_xs
resize_window
(
767
,
768
)
end
def
resize_screen_sm
resize_window
(
900
,
768
)
end
...
...
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