From 02a5c800026c0bcc26208249a0a987018dad4404 Mon Sep 17 00:00:00 2001 From: Shelby Sturgis Date: Fri, 12 Dec 2014 02:12:25 +0100 Subject: [PATCH 1/4] removing code that attempted to obtain the height of a chart to calculate the maximum truncate length for x axis labels. --- src/kibana/components/vislib/lib/x_axis.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/kibana/components/vislib/lib/x_axis.js b/src/kibana/components/vislib/lib/x_axis.js index 5b0a56169c009..0cce314e612e0 100644 --- a/src/kibana/components/vislib/lib/x_axis.js +++ b/src/kibana/components/vislib/lib/x_axis.js @@ -241,15 +241,6 @@ define(function (require) { self._attr.isRotated = false; return function (selection) { - - // maxRotatedLength = min of 60% chart height or maxRotatedLength - var chtWrap = d3.select(this.node().parentNode.parentNode.parentNode).select('.chart-wrapper'); - if (chtWrap) { - var chtWrapHt = chtWrap.style('height'); - chtWrapHt = 0.6 * +chtWrapHt.substring(0, chtWrapHt.length - 2); - maxRotatedLength = _.min([maxRotatedLength, chtWrapHt]); - } - text = selection.selectAll('.tick text'); text.each(function textWidths() { From cc3ae6e7fa69335b4749c4a830b4b1148fe772fd Mon Sep 17 00:00:00 2001 From: Shelby Sturgis Date: Fri, 12 Dec 2014 02:14:03 +0100 Subject: [PATCH 2/4] removing unused vars --- src/kibana/components/vislib/lib/x_axis.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/kibana/components/vislib/lib/x_axis.js b/src/kibana/components/vislib/lib/x_axis.js index 0cce314e612e0..fabd00c4d3e15 100644 --- a/src/kibana/components/vislib/lib/x_axis.js +++ b/src/kibana/components/vislib/lib/x_axis.js @@ -232,10 +232,8 @@ define(function (require) { var text; var barWidth = self.xScale.rangeBand(); var maxRotatedLength = 180; - var textWidth = 0; var xAxisPadding = 15; var svg; - var xAxisLabelHt = 15; var lengths = []; var length; self._attr.isRotated = false; From 7b0e14c86f61b422b93cfc1ed55e9f0888f187d9 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Fri, 12 Dec 2014 16:00:03 -0700 Subject: [PATCH 3/4] [lesshat] expand arg lists to previde chrome defaults to IE --- src/kibana/components/vislib/styles/_layout.less | 4 ++-- src/kibana/components/visualize/visualize.less | 4 ++-- src/kibana/plugins/visualize/editor/styles/editor.less | 2 +- src/kibana/styles/_control_group.less | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kibana/components/vislib/styles/_layout.less b/src/kibana/components/vislib/styles/_layout.less index 92cb0f4346d72..3cb0c17a83f23 100644 --- a/src/kibana/components/vislib/styles/_layout.less +++ b/src/kibana/components/vislib/styles/_layout.less @@ -104,11 +104,11 @@ } .chart-row { - .flex(1 1); + .flex(1 1 auto); } .chart-column { - .flex(1 1); + .flex(1 1 auto); } .x-axis-wrapper { diff --git a/src/kibana/components/visualize/visualize.less b/src/kibana/components/visualize/visualize.less index 2d73cb0e74078..89c1ff67ea8ea 100644 --- a/src/kibana/components/visualize/visualize.less +++ b/src/kibana/components/visualize/visualize.less @@ -16,7 +16,7 @@ visualize { } .visualize-chart { - .flex(1, 1); + .flex(1 1 auto); overflow: auto; &.spy-visible { @@ -85,7 +85,7 @@ visualize-spy { } > .alert { - .flex(0 0 auto); + .flex(0, 0, auto); } tr > td { diff --git a/src/kibana/plugins/visualize/editor/styles/editor.less b/src/kibana/plugins/visualize/editor/styles/editor.less index 2449933d79863..d324377851ff4 100644 --- a/src/kibana/plugins/visualize/editor/styles/editor.less +++ b/src/kibana/plugins/visualize/editor/styles/editor.less @@ -119,7 +119,7 @@ &-header { .display(flex); .align-items(center); - .flex(1); + .flex(1, 0, auto); &-toggle { .flex(0, 0, auto); diff --git a/src/kibana/styles/_control_group.less b/src/kibana/styles/_control_group.less index 7146a52444eba..5d47175930cad 100644 --- a/src/kibana/styles/_control_group.less +++ b/src/kibana/styles/_control_group.less @@ -22,7 +22,7 @@ // the element should take up an even share of available space > .fill { - .flex(1, 1, 0); + .flex(1, 1, 1%); } button { From 587007e9039e27cbdd4024a26365cb21deac9e1b Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Fri, 12 Dec 2014 16:38:18 -0700 Subject: [PATCH 4/4] [controlGroup] get specific with the flexing so that IE can keep up --- src/kibana/styles/_control_group.less | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/kibana/styles/_control_group.less b/src/kibana/styles/_control_group.less index 5d47175930cad..34d2ac9ae8ebd 100644 --- a/src/kibana/styles/_control_group.less +++ b/src/kibana/styles/_control_group.less @@ -75,9 +75,28 @@ } } - .inline-form .input-group { - input { - height: auto; + .inline-form { + .flex-parent(); + .display(flex); + + > .typeahead { + .flex-parent(); + + > .input-group { + .display(flex); + .flex(1, 0, auto); + + > * { + float: none; + height: auto; + width: auto; + .flex(0 0 auto); + } + + [validate-query] { + .flex(1 1 100%); + } + } } } }