Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSVB less to sass - and some UI work #24250

Merged
merged 43 commits into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
984a1dd
Changed `kuiTabs` to use `EuiTabs` instead
cchaos Oct 15, 2018
16ba0c7
agg_row now uses EUI
cchaos Oct 16, 2018
7ddf93f
Updating series containers to use EUI
cchaos Oct 16, 2018
b8097be
Updated all aggs to use EUI
cchaos Oct 16, 2018
41dd921
Making series’ panels
cchaos Oct 16, 2018
2996149
Updated panel configs to use EUI
cchaos Oct 17, 2018
305f917
More config options converted to EUI
cchaos Oct 17, 2018
b890ee8
Splits converted to EUI
cchaos Oct 17, 2018
83791c6
Finished up vis_types folder
cchaos Oct 17, 2018
b933a70
Color picker done
cchaos Oct 17, 2018
2dd6da2
Yes/No converted to EUI
cchaos Oct 17, 2018
621637f
`.thor__visualization` wasn’t being used
cchaos Oct 17, 2018
e683fff
More components updated
cchaos Oct 17, 2018
c9b2073
Fixed split vis’
cchaos Oct 17, 2018
4effbab
Fixed up apply button area
cchaos Oct 17, 2018
55fc23f
Markdown and icon select done
cchaos Oct 17, 2018
a0a99fa
No more misc.less
cchaos Oct 17, 2018
13fb453
Finished up SASS
cchaos Oct 17, 2018
795556d
mixin cleanup
cchaos Oct 17, 2018
9f376da
Initial conversion of visualization .less
cchaos Oct 18, 2018
d58a1d7
top_n vis updated
cchaos Oct 18, 2018
06b3084
metric vis updated
cchaos Oct 18, 2018
31e9297
Updated gauge
cchaos Oct 18, 2018
7567c02
Updated annotations
cchaos Oct 18, 2018
c1da950
Finished up timeseries including legend and tooltip
cchaos Oct 18, 2018
2f00382
More tooltip fix up
cchaos Oct 18, 2018
6e30f2b
fix text color
cchaos Oct 18, 2018
d458dd6
updated tests
cchaos Oct 18, 2018
e7fda17
Fix typo in feedback_message for tag cloud
cchaos Oct 18, 2018
eeeb460
Fixing more tests
cchaos Oct 18, 2018
ebdd555
Updating MetricSelect instances to be wrapped in EuiFormRow
cchaos Oct 18, 2018
80fdbe3
Make sure AggSelect’s aren’t in any EuiFormRows
cchaos Oct 18, 2018
e47543f
Wrapping field_select implementations in form rows
cchaos Oct 18, 2018
d60b3ef
A few fixes
cchaos Oct 19, 2018
273aa14
Merge remote-tracking branch '2_upstream/master' into tsvb-less-to-sass
cchaos Oct 19, 2018
49d5a32
Added title attribute to legend label
cchaos Oct 19, 2018
6eba933
Moved filter towards the top of options panel
cchaos Oct 19, 2018
71e8d63
Merge remote-tracking branch '2_upstream/master' into tsvb-less-to-sass
cchaos Nov 5, 2018
77ebfdf
Merge remote-tracking branch '2_upstream/master' into tsvb-less-to-sass
cchaos Nov 6, 2018
7c270a6
Adding some sizing to errors
cchaos Nov 6, 2018
d98d4c1
Adding “small” size to tabs
cchaos Nov 6, 2018
b7020e3
Added more id’s
cchaos Nov 6, 2018
1d37cc4
Fixed error alignments
cchaos Nov 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/core_plugins/metrics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export default function (kibana) {
uiExports: {
visTypes: [
'plugins/metrics/kbn_vis_types'
]
],
styleSheetPaths: `${__dirname}/public/index.scss`,
},

config(Joi) {
Expand Down
128 changes: 128 additions & 0 deletions src/core_plugins/metrics/public/_hacks.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
// EUITODO: Create our own Markdown styles
.tvbMarkdown__content {
color: rgba(0,0,0,1);

pre, code, tt {
border-radius: 0;
font: 1em/1.5em 'Andale Mono', 'Lucida Console', monospace;
}

h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 16px; }

h1, h2, h3, h4, h5, h6, b, strong {
margin:0 0 15px 0;
font-weight: bold;
}
em, i, dfn {
font-style: italic;
}
dfn {
font-weight:bold;
}
p, code, pre, kbd {
margin:0 0 15px 0;
}
blockquote {
margin:0 15px 15px 15px;
}
cite {
font-style: italic;
}
li ul, li ol {
margin:0 15px;
}
ul, ol {
margin:0 15px 15px 15px;
}
ul {
list-style-type:disc;
}
ol {
list-style-type:decimal;
}
ol ol {
list-style: upper-alpha;
}
ol ol ol {
list-style: lower-roman;
}
ol ol ol ol {
list-style: lower-alpha;
}
dl {
margin:0 0 15px 0;
}
dl dt {
font-weight:bold;
}
dd {
margin-left:1.5em;
}
table {
margin-bottom:1.4em;
width:100%;
}
th {
font-weight:bold;
}
th, td, caption {
padding:4px 15px 4px 5px;
}
tfoot {
font-style:italic;
}
sup, sub {
line-height:0;
}
abbr, acronym {
border-bottom: 1px dotted;
}
address {
margin:0 0 15px;
font-style:italic;
}
del {
text-decoration: line-through;
}
pre {
margin: 15px 0;
white-space: pre;
}
img {
max-width: 100%;
}
pre, code, tt {
background-color: rgba(0,0,0,0.1);
color: red;
code {
color: rgba(0,0,0,1);
background-color: transparent;
}
border: none;
}

.tvbMarkdown.reversed & {
.table > thead > tr > th {
color: rgba(255,255,255,0.5);
border-bottom: 2px solid rgba(255,255,255,0.2);
}
.table > tbody > tr > td {
border-top: 1px solid rgba(255,255,255,0.2);
}
color: rgba(255,255,255,1);
pre, code, tt {
background-color: rgba(255,255,255,0.2);
color: #ffa5a8;
code {
color: rgba(255,255,255,1);
background-color: transparent;
}
border: none;
}
}
}
14 changes: 14 additions & 0 deletions src/core_plugins/metrics/public/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@import 'node_modules/@elastic/eui/src/components/form/variables';
@import 'node_modules/@elastic/eui/src/components/form/mixins';

@mixin tvbEditor__repeatingRow {
background-color: $euiColorLightestShade;
padding: $euiSizeS;
margin-bottom: $euiSizeS;
}

// SASSTODO: These need to be converted to EUI,
// but they have type errors
@mixin tvbEditor__input {
@include euiFormControlStyle($borderOnly: false, $includeStates: true, $includeSizes: false);
}
41 changes: 41 additions & 0 deletions src/core_plugins/metrics/public/_ui_sortable.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// react-anything-sortable overrides
// Scoped to just the TSVB editor

.tvbEditor {

.ui-sortable {
display: block;
position: relative;
overflow: visible;
user-select: none;

&:before,
&:after {
content: " ";
display: table;
}

&:after {
clear: both;
}

.ui-sortable-item.ui-sortable-dragging {
position: absolute;
z-index: $euiZLevel2;
}

.ui-sortable-placeholder {
display: none;

&.visible {
display: block;
opacity: 0.5;
z-index: -1;
}
}
}

}



11 changes: 11 additions & 0 deletions src/core_plugins/metrics/public/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$tvbLineColor: transparentize($euiColorFullShade,0.8);
$tvbLineColorReversed: transparentize($euiColorEmptyShade,0.6);

$tvbTextColor: transparentize($euiColorFullShade,0.6);
$tvbTextColorReversed: transparentize($euiColorEmptyShade,0.4);

$tvbValueColor: transparentize($euiColorFullShade,0.3);
$tvbValueColorReversed: transparentize($euiColorEmptyShade,0.2);

$tvbHoverBackgroundColor: transparentize($euiColorFullShade,0.9);
$tvbHoverBackgroundColorReversed: transparentize($euiColorEmptyShade,0.9);
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@import 'node_modules/@elastic/eui/src/components/panel/mixins';

.tvbAnnotationsEditor__container {
padding: $euiSize;
background-color: $euiColorLightestShade;
}

@include euiPanel('tvbAnnotationsEditor');

.tvbAnnotationsEditor {
margin-bottom: $euiSize;
padding: $euiSizeS;
}
44 changes: 44 additions & 0 deletions src/core_plugins/metrics/public/components/_color_picker.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// EUITODO: Convert to EuiColorPicker

@import 'node_modules/@elastic/eui/src/components/color_picker/index';

.tvbColorPicker {
display: flex;
align-items: center;
position: relative;
}

.tvbColorPicker__swatch-empty,
.tvbColorPicker__swatch {
@extend .euiColorPicker__swatch;
}

.tvbColorPicker__swatch-empty {
background-color: transparent;
background-size: 22px 22px;
background-image: repeating-linear-gradient(
-45deg,
$euiColorDanger,
$euiColorDanger 2px,
transparent 2px,
transparent $euiSize
);
}

.tvbColorPicker__clear {
margin-left: $euiSizeXS;
}

.tvbColorPicker__popover {
position: absolute;
top: $euiSizeL;
z-index: 2;
}

.tvbColorPicker__cover {
position: fixed;
top: 0px;
right: 0px;
left: 0px;
bottom: 0px;
}
3 changes: 3 additions & 0 deletions src/core_plugins/metrics/public/components/_color_rules.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.tvbColorRules__rule {
@include tvbEditor__repeatingRow;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// EUITODO: Convert to EuiColorPicker
// with additional support for alpha, saturation, swatches

// SASSTODO: This custom picker moved all styles from react-color inline styles
// to SASS, but it should be in EUI.
// Also, some pixel values were kept as is to match inline styles from react-color
.tvbColorPickerPopUp {
@include euiBottomShadowMedium();
background-color: $euiColorEmptyShade;
border-radius: $euiBorderRadius;
box-sizing: initial;
width: 275px;
font-family: 'Menlo';
}

.tvbColorPickerPopUp__saturation {
width: 100%;
padding-bottom: 55%;
position: relative;
border-radius: $euiBorderRadius $euiBorderRadius 0 0;
overflow: hidden;
}

.tvbColorPickerPopUp__body {
padding: $euiSize;
}

.tvbColorPickerPopUp__controls {
display: flex;
}

.tvbColorPickerPopUp__color {
width: $euiSizeXL;

// The color indicator doesn't work, hiding it until it does
display: none;
}

.tvbColorPickerPopUp__color-disableAlpha {
width: $euiSizeL;
}

.tvbColorPickerPopUp__swatch {
margin-top: 6px;
width: $euiSize;
height: $euiSize;
border-radius: $euiSizeS;
position: relative;
overflow: hidden;
}

.tvbColorPickerPopUp__swatch-disableAlpha {
width: 10px;
height: 10px;
margin: 0px;
}

.tvbColorPickerPopUp__active {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
border-radius: $euiSizeS;
box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
z-index: 2;
}

.tvbColorPickerPopUp__toggles {
flex: 1
}

.tvbColorPickerPopUp__hue {
height: 10px;
position: relative;
margin-bottom: $euiSizeS;
}

.tvbColorPickerPopUp__hue-disableAlpha {
margin-bottom: 0px;
}

.tvbColorPickerPopUp__alpha {
height: 10px;
position: relative;
}

.tvbColorPickerPopUp__alpha-disableAlpha {
display: none;
}

.tvbColorPickerPopUp__swatches {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-top: $euiSize;
}
29 changes: 29 additions & 0 deletions src/core_plugins/metrics/public/components/_error.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// EUITODO: Convert to EuiCallout
.tvbError {
padding: $euiSize;

// Calculate colors similar to EuiCallout
$tempBackgroundColor: tintOrShade($euiColorDanger, 90%, 70%);
background-color: $tempBackgroundColor;

.tvbError__title {
@include euiTitle("xs");
color: makeHighContrastColor($euiColorDanger, $tempBackgroundColor);
}
}

.tvbError__additional,
.tvbError__stack {
margin-top: $euiSizeS;
}

// EUITODO: Convert to EuiCodeBlock
.tvbError__stack {
padding: $euiSizeS;
background: $euiCodeBlockBackgroundColor;
color: $euiCodeBlockColor;
line-height: $euiLineHeight;
font-family: $euiCodeFontFamily;
font-weight: $euiFontWeightRegular;
white-space: pre-wrap;
}
Loading