From d8b065841fc6561b4a27fe537c00395cd25b2ca0 Mon Sep 17 00:00:00 2001 From: Matt Bargar Date: Tue, 15 Sep 2015 11:47:54 -0400 Subject: [PATCH] Fixes #3833 make Visualize sidebar collapsible like the one on the Discover page --- src/plugins/kibana/public/visualize/editor/editor.html | 4 +++- src/plugins/kibana/public/visualize/editor/editor.js | 1 + .../kibana/public/visualize/editor/styles/_editor.less | 6 +++++- src/ui/public/collapsible_sidebar/collapsible_sidebar.less | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/plugins/kibana/public/visualize/editor/editor.html b/src/plugins/kibana/public/visualize/editor/editor.html index 6841fbca8190a..1f9bd00591ae0 100644 --- a/src/plugins/kibana/public/visualize/editor/editor.html +++ b/src/plugins/kibana/public/visualize/editor/editor.html @@ -126,7 +126,9 @@
- +
+ +
diff --git a/src/plugins/kibana/public/visualize/editor/editor.js b/src/plugins/kibana/public/visualize/editor/editor.js index 963dfbccda0c1..b48616998cc49 100644 --- a/src/plugins/kibana/public/visualize/editor/editor.js +++ b/src/plugins/kibana/public/visualize/editor/editor.js @@ -6,6 +6,7 @@ define(function (require) { require('ui/visualize'); require('ui/clipboard'); + require('ui/collapsible_sidebar'); require('ui/routes') .when('/visualize/create', { diff --git a/src/plugins/kibana/public/visualize/editor/styles/_editor.less b/src/plugins/kibana/public/visualize/editor/styles/_editor.less index 38e7eabfe6099..fa44896cbada2 100644 --- a/src/plugins/kibana/public/visualize/editor/styles/_editor.less +++ b/src/plugins/kibana/public/visualize/editor/styles/_editor.less @@ -64,8 +64,12 @@ } } - &-sidebar { + .collapsible-sidebar { .flex-parent(0, 0, auto); + } + + &-sidebar { + .flex-parent(1, 0, auto); // overrided for tablet and desktop @media (min-width: @screen-md-min) { diff --git a/src/ui/public/collapsible_sidebar/collapsible_sidebar.less b/src/ui/public/collapsible_sidebar/collapsible_sidebar.less index 5418f4f8e7dda..537b906b89d3d 100644 --- a/src/ui/public/collapsible_sidebar/collapsible_sidebar.less +++ b/src/ui/public/collapsible_sidebar/collapsible_sidebar.less @@ -1,6 +1,6 @@ @import (reference) "~ui/styles/variables"; -.sidebar-container.collapsible-sidebar { +.collapsible-sidebar { position: relative; z-index: 1; @@ -61,7 +61,7 @@ } @media (max-width: 992px) { - .sidebar-container.collapsible-sidebar { + .collapsible-sidebar { &.closed { display: none; }