Commit 204fee4f authored by Job van der Voort's avatar Job van der Voort

move all sidebars to one side for improved UX; add button in head of...

move all sidebars to one side for improved UX; add button in head of projects/issues and milestones instead of tab on side of screen to prevent overlapping of content
parent 9c843041
...@@ -2,18 +2,13 @@ responsive_resize = -> ...@@ -2,18 +2,13 @@ responsive_resize = ->
current_width = $(window).width() current_width = $(window).width()
if current_width < 985 if current_width < 985
$('.responsive-side').addClass("ui right wide sidebar") $('.responsive-side').addClass("ui right wide sidebar")
$('.responsive-side-left').addClass("ui left sidebar")
else else
$('.responsive-side').removeClass("ui right wide sidebar") $('.responsive-side').removeClass("ui right wide sidebar")
$('.responsive-side-left').removeClass("ui left sidebar")
$ -> $ ->
# Depending on window size, set the sidebar offscreen. # Depending on window size, set the sidebar offscreen.
responsive_resize() responsive_resize()
$('.ui.sidebar')
.sidebar()
$('.sidebar-expand-button').click -> $('.sidebar-expand-button').click ->
$('.ui.sidebar') $('.ui.sidebar')
.sidebar({overlay: true}) .sidebar({overlay: true})
......
...@@ -5,17 +5,19 @@ ...@@ -5,17 +5,19 @@
width: 285px; width: 285px;
} }
.ui.left.sidebar {
border-right: 1px solid #e1e1e1;
border-left: 0;
}
.ui.right.sidebar { .ui.right.sidebar {
border-left: 1px solid #e1e1e1; border-left: 1px solid #e1e1e1;
border-right: 0; border-right: 0;
} }
.sidebar-expand-button { .sidebar-expand-button {
cursor: pointer;
transition: all 0.4s;
-moz-transition: all 0.4s;
-webkit-transition: all 0.4s;
}
.fixed.sidebar-expand-button {
background: #f9f9f9; background: #f9f9f9;
color: #555; color: #555;
padding: 9px 12px 6px 14px; padding: 9px 12px 6px 14px;
...@@ -25,11 +27,6 @@ ...@@ -25,11 +27,6 @@
top: 108px; top: 108px;
right: 0px; right: 0px;
margin-right: 0; margin-right: 0;
cursor: pointer;
transition: all 0.4s;
-moz-transition: all 0.4s;
-webkit-transition: all 0.4s;
&:hover { &:hover {
background: #ddd; background: #ddd;
color: #333; color: #333;
...@@ -37,13 +34,13 @@ ...@@ -37,13 +34,13 @@
} }
} }
.left.sidebar-expand-button { .btn.btn-default.sidebar-expand-button {
left: 0px; margin-left: 12px;
right: auto; display: inline-block !important;
border: 1px solid #E1E1E1; }
border-left: 0;
&:hover { @media (min-width: 767px) {
padding-right: 14px; .btn.btn-default.sidebar-expand-button {
padding-left: 25px; display: none!important;
} }
} }
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
%hr %hr
.row .row
.left.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.icon-list.icon-2x
.col-md-3.responsive-side-left .col-md-3.responsive-side
= render 'shared/filter', entity: 'issue' = render 'shared/filter', entity: 'issue'
.col-md-9 .col-md-9
= render 'shared/issues' = render 'shared/issues'
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
List all merge requests from all projects you have access to. List all merge requests from all projects you have access to.
%hr %hr
.row .row
.left.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.icon-list.icon-2x
.col-md-3.responsive-side-left .col-md-3.responsive-side
= render 'shared/filter', entity: 'merge_request' = render 'shared/filter', entity: 'merge_request'
.col-md-9 .col-md-9
= render 'shared/merge_requests' = render 'shared/merge_requests'
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.side.col-md-4.left.responsive-side .side.col-md-4.left.responsive-side
= render 'sidebar' = render 'sidebar'
.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.icon-list.icon-2x
- else - else
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
%hr %hr
.row .row
.left.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.icon-list.icon-2x
.col-md-3.responsive-side-left .col-md-3.responsive-side
= render 'shared/filter', entity: 'issue' = render 'shared/filter', entity: 'issue'
.col-md-9 .col-md-9
= render 'shared/issues' = render 'shared/issues'
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
To see all merge requests you should visit #{link_to 'dashboard', merge_requests_dashboard_path} page. To see all merge requests you should visit #{link_to 'dashboard', merge_requests_dashboard_path} page.
%hr %hr
.row .row
.left.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.icon-list.icon-2x
.col-md-3.responsive-side-left .col-md-3.responsive-side
= render 'shared/filter', entity: 'merge_request' = render 'shared/filter', entity: 'merge_request'
.col-md-9 .col-md-9
= render 'shared/merge_requests' = render 'shared/merge_requests'
...@@ -9,6 +9,11 @@ ...@@ -9,6 +9,11 @@
= nav_link(controller: :labels) do = nav_link(controller: :labels) do
= link_to 'Labels', project_labels_path(@project), class: "tab" = link_to 'Labels', project_labels_path(@project), class: "tab"
- if current_controller?(:milestones)
%li.pull-right
%button.btn.btn-default.sidebar-expand-button
%i.icon.icon-list
- if current_controller?(:issues) - if current_controller?(:issues)
- if current_user - if current_user
%li %li
...@@ -17,6 +22,8 @@ ...@@ -17,6 +22,8 @@
%li.pull-right %li.pull-right
.pull-right .pull-right
%button.btn.btn-default.sidebar-expand-button
%i.icon.icon-list
= form_tag project_issues_path(@project), method: :get, id: "issue_search_form", class: 'pull-left issue-search-form' do = form_tag project_issues_path(@project), method: :get, id: "issue_search_form", class: 'pull-left issue-search-form' do
.append-right-10.hidden-xs.hidden-sm .append-right-10.hidden-xs.hidden-sm
= search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' } = search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' }
......
= render "head" = render "head"
.row .row
.left.sidebar-expand-button.hidden-lg.hidden-md .fixed.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs
%i.icon-list.icon-2x %i.icon-list.icon-2x
.col-md-3.responsive-side-left .col-md-3.responsive-side
= render 'shared/project_filter', project_entities_path: project_issues_path(@project), = render 'shared/project_filter', project_entities_path: project_issues_path(@project),
labels: true, redirect: 'issues' labels: true, redirect: 'issues'
.col-md-9.issues-holder .col-md-9.issues-holder
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
%span (#{@merge_requests.total_count}) %span (#{@merge_requests.total_count})
%hr %hr
.row .row
.left.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.icon-list.icon-2x
.col-md-3.responsive-side-left .col-md-3.responsive-side
= render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project), = render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project),
labels: true, redirect: 'merge_requests' labels: true, redirect: 'merge_requests'
.col-md-9 .col-md-9
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
New Milestone New Milestone
.row .row
.left.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs
%i.icon-list.icon-2x %i.icon-list.icon-2x
.col-md-3.responsive-side-left .col-md-3.responsive-side
%ul.nav.nav-pills.nav-stacked %ul.nav.nav-pills.nav-stacked
%li{class: ("active" if (params[:f] == "active" || !params[:f]))} %li{class: ("active" if (params[:f] == "active" || !params[:f]))}
= link_to project_milestones_path(@project, f: "active") do = link_to project_milestones_path(@project, f: "active") do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment