Project

General

Profile

Actions

Patch #21808

open

Make the Sidebar collapsible, stateful

Added by Daniel Ritz over 8 years ago. Updated about 2 years ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
UI
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This adds a button to the sidebar to make it collapsible. The state is preserved between requests with a cookie.

This seems to be a feature that is missed. There's a few plugins that implement something similar. Some of them:

And there are related issues, at least: #12032, #10525

Because of high demand from my users, I did something similar in a theme at work. This is basically that plus it's stateful now.

This patch:
  • Adds the relative URL root as a meta property in the head tag
  • Adds a simple <a> to the sidebar as collapse/expand button
  • Makes the .content a BFC taking the remaining width
  • Few lines of javascript to toggle CSS and set a cookie
  • Sidebar is hidden by setting its margin-right
  • Nice hiding animation using CSS for browsers that support it
  • The state of the sidebar is read from the cookie and applied on page load
  • Good theming support since it's mostly just CSS

Based on r15095, passes all tests with Ruby 2.1.5. Tested on FF, Chrome, Safari (+ an earlier, stateless version on IE11)

Screenshot: Screenshot


Files

0001-Make-sidebar-collapsible.patch (6.16 KB) 0001-Make-sidebar-collapsible.patch Daniel Ritz, 2016-01-23 21:49
collapsible_sidebar.png (16.1 KB) collapsible_sidebar.png Screenshot Daniel Ritz, 2016-01-23 21:54
Screen Shot 2016-01-29 at 00.20.06.png (78.7 KB) Screen Shot 2016-01-29 at 00.20.06.png Marius BĂLTEANU, 2016-01-28 23:20
0001-Make-sidebar-collapsible-r15348.patch (6.16 KB) 0001-Make-sidebar-collapsible-r15348.patch Re-based on top of r15348 Daniel Ritz, 2016-04-23 18:33
0001-Make-sidebar-collapsible-r15746.patch (5.19 KB) 0001-Make-sidebar-collapsible-r15746.patch Rebased for 3.3-stable as of r15746 Daniel Ritz, 2016-08-20 20:20
0001-make-the-sidebar-collapsible-with-per-page-state.patch (5.55 KB) 0001-make-the-sidebar-collapsible-with-per-page-state.patch local storage based solution with per page sidebar state Jens Krämer, 2016-09-01 02:39
before.png (94.2 KB) before.png Marius BĂLTEANU, 2016-09-07 20:44
after.png (96.9 KB) after.png Marius BĂLTEANU, 2016-09-07 20:44
0001-make-the-sidebar-collapsible-with-per-page-state.patch (6.71 KB) 0001-make-the-sidebar-collapsible-with-per-page-state.patch updated version of the patch addressing the issues from comment 20 Jens Krämer, 2016-10-11 06:14
0001-Collapsible-sidebar-with-expand-on-hover.patch (6.28 KB) 0001-Collapsible-sidebar-with-expand-on-hover.patch Marius BĂLTEANU, 2019-09-09 22:25
expended_on_hover.png (358 KB) expended_on_hover.png Marius BĂLTEANU, 2019-09-09 22:28
expended.png (451 KB) expended.png Marius BĂLTEANU, 2019-09-09 22:28
collapsed.png (419 KB) collapsed.png Marius BĂLTEANU, 2019-09-09 22:28
collapsible-sidebar-with-expand-on-hover-18474.patch (6.12 KB) collapsible-sidebar-with-expand-on-hover-18474.patch Anonymous, 2019-09-17 05:52
1. pinned.PNG (45.4 KB) 1. pinned.PNG Marian Liviriniu, 2022-03-22 08:21
2. collapsed.PNG (37.6 KB) 2. collapsed.PNG Marian Liviriniu, 2022-03-22 08:22
3. hovered over.png (57.7 KB) 3. hovered over.png Marian Liviriniu, 2022-03-22 08:22
collapsible-sidebar-with-expand-on-hover-for_Redmine_4_2_1.patch (5.68 KB) collapsible-sidebar-with-expand-on-hover-for_Redmine_4_2_1.patch Marian Liviriniu, 2022-03-22 08:22

Related issues

Related to Redmine - Feature #24671: Make the header fixedNew

Actions
Related to Redmine - Feature #25686: Make the issues sidebar menu use accordion with JQueryNew

Actions
Related to Redmine - Feature #32520: Issues activity gnats calendar tabs - too much real estate in high hand panelClosed

Actions
Has duplicate Redmine - Feature #5746: Feature Request - Allow the sidebar to be collapsableClosed2010-06-24

Actions
Has duplicate Redmine - Feature #12032: Collapsible SidebarClosed

Actions
Has duplicate Redmine - Feature #10525: A new button to hide/show the sidebarClosed

Actions
Actions

Also available in: Atom PDF