Patch #12032

Collapsible Sidebar

Added by Brandon Liles about 5 years ago. Updated over 2 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:Candidate for next major release

Description

We frequently have meetings in our conference room where we refer to Redmine for information about projects and issues for our organization. We have added a very small amount of JavaScript and CSS to Redmine to allow us to collapse the sidebar so that we have more screen space when viewing found it very useful to be able to collapse the sidebar so that we have more horizontal space on the screen. The is especially useful since we generally increase the font size in the browser.

collapsible-sidebar.diff Magnifier (1 KB) Brandon Liles, 2012-11-12 19:10


Related issues

Related to Redmine - Feature #10525: A new button to hide/show the sidebar New
Related to Redmine - Patch #21808: Make the Sidebar collapsible, stateful Needs feedback
Duplicated by Redmine - Feature #12877: optimize ticket / issue view (template / theme) Closed

History

#1 Updated by Terence Mill about 5 years ago

Please upload the patches.

+ for the feature.

#2 Updated by Toshi MARUYAMA about 5 years ago

  • Category set to UI

#3 Updated by ana gonzalez about 5 years ago

  • Assignee set to Jonas De Meulenaere
  • % Done changed from 0 to 100

Brandon Liles wrote:

We frequently have meetings in our conference room where we refer to Redmine for information about projects and issues for our organization. We have added a very small amount of JavaScript and CSS to Redmine to allow us to collapse the sidebar so that we have more screen space when viewing found it very useful to be able to collapse the sidebar so that we have more horizontal space on the screen. The is especially useful since we generally increase the font size in the browser.

#4 Updated by Toshi MARUYAMA about 5 years ago

  • Assignee deleted (Jonas De Meulenaere)
  • % Done changed from 100 to 0

#5 Updated by Wolfgang Neudorfer almost 5 years ago

Terence Mill wrote:

Please upload the patches.

+ for the feature.

I would also love to see the patch.

#6 Updated by Brandon Liles almost 5 years ago

Sorry I was slow to provide the patch, diff is attached. The only other thing you need is to apply a little bit of CSS in your theme and have images for the expand/collapse control:

.collapsed #sidebar-content, .collapsed #hide-side-bar, .expanded #show-side-bar, .collapsed #watchers {
   display: none;
}
.expanded #sidebar-content, .expanded #hide-side-bar, .collapsed #show-side-bar, .expanded #watchers {
   display: block;
}

#7 Updated by Terence Mill almost 5 years ago

+1 for trunk

Thats slick!

#8 Updated by Jun NAITOH almost 5 years ago

+1

#10 Updated by Christian Ziegelt over 4 years ago

Strange - I thought this diff would help me in hiding the sidebar ans saving space.
If I apply the patch (I did it by hand - since I did not find the way to do it automatically) and edit the css file, I will end up with a sidebar which is collapsed from down -> up.

What I thought this was good for is: saving space on the left hand side for tickets.
How to I control that the DIV is collapsed from LEFT to RRIGHT ?

Here is my DIFFed file

<div id="sidebarWrapper" class="expanded">
<p id="hide-side-bar"><a onclick="document.getElementById('sidebarWrapper').className='collapsed';document.getElementById('sidebar').className='collapsed';"><img src="/images/sidebar_collapse.jpeg" /></a></p>
<p id="show-side-bar"><a onclick="document.getElementById('sidebarWrapper').className='expanded';document.getElementById('sidebar').className='expanded';"><img src="/images/sidebar_expand.png" /></a></p>
<div id="sidebar-content" >

<h3><%= l(:label_issue_plural) %></h3>
<%= link_to l(:label_issue_view_all), _project_issues_path(@project, :set_filter => 1) %><br />
<% if @project %>
<%= link_to l(:field_summary), project_issues_report_path(@project) %><br />
<% end %>
<%= call_hook(:view_issues_sidebar_issues_bottom) %>

<% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
  <%= link_to l(:label_calendar), _project_calendar_path(@project) %><br />
<% end %>
<% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
  <%= link_to l(:label_gantt), _project_gantt_path(@project) %><br />
<% end %>
<%= call_hook(:view_issues_sidebar_planning_bottom) %>

<%= render_sidebar_queries %>
<%= call_hook(:view_issues_sidebar_queries_bottom) %>

</div>
</div>

#11 Updated by Brandon Liles over 4 years ago

Christian,

Your theme has to use a flexible layout, the content div needs to set width=auto, overflow=auto in the CSS in order for the collapse to work correctly:

This is what the critical section looks like in my hack of the A1 theme:

div#content {
   width: auto;
   overflow: auto;
}

div#main.nosidebar div#content {
   width: auto;
}

#sidebar {
   width: auto;

#12 Updated by Daniel Felix over 4 years ago

  • Tracker changed from Feature to Patch
  • Target version set to 2.4.0

I have detected, that this one is a duplicate of #10525.
Normally, the newer post should be closed as duplicate. But I will change this tracker type to patch, as this contains many hints to complete #10525.

#13 Updated by Ivan Cenov over 4 years ago

There is also a plugin for hiding sidebar: https://github.com/ries-tech/sidebar_hide

#14 Updated by Dipan Mehta over 4 years ago

As I stated in #1294

I am using the above mentioned plugin

Many themes are simply not compatible with the the plug-in. Unfortunately, by digging up you realize this is is neither a plug-in's own issue as such because many themes have their own peculiar problems (and default theme works) on the other hand - most themes works perfectly except this side bar features!

This feature should be core, as it affects UI for all the modules, layouts. Usually, if plugins being maintained by others cann't be controlled but whatever is solved once in Redmine core is mostly likely to be supported for the rest. Hence, I think this should be part of core.

#15 Updated by Jean-Philippe Lang about 4 years ago

  • Target version changed from 2.4.0 to Candidate for next major release

2.4 feature freeze

#16 Updated by Hans Bangkok over 3 years ago

yes this really should be core, so many important 3rd-party plugins have fallen by the wayside

#17 Updated by Jérôme BATAILLE over 2 years ago

Hi, a plugin was developped inside my company.
Still working with current version.

https://github.com/Smile-SA/redmine_smile_togglesidebar

#18 Updated by Toshi MARUYAMA over 1 year ago

  • Related to Patch #21808: Make the Sidebar collapsible, stateful added

Also available in: Atom PDF