Project

General

Profile

Actions

Feature #21808

closed

Make the Sidebar collapsible, stateful

Added by Daniel Ritz almost 9 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

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
collapsible-sidebar-with-expand-on-hover-for_r23166.patch (6.73 KB) collapsible-sidebar-with-expand-on-hover-for_r23166.patch Mizuki ISHIKAWA, 2024-10-28 06:39
clipboard-202411070118-ecwf7.png (58.8 KB) clipboard-202411070118-ecwf7.png Marius BĂLTEANU, 2024-11-07 00:18
clipboard-202411070118-ybb0t.png (58.7 KB) clipboard-202411070118-ybb0t.png Marius BĂLTEANU, 2024-11-07 00:18
clipboard-202411070119-znrmc.png (19.2 KB) clipboard-202411070119-znrmc.png Marius BĂLTEANU, 2024-11-07 00:19

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