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

Timroes/eui vis type selection #4

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
81 changes: 71 additions & 10 deletions src/core_plugins/kibana/public/visualize/wizard/_dialog.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,59 @@
.visNewVisDialog {
background: linear-gradient(-25deg, rgba(0,179,164,0.3) 0%,rgba(255,255,255,0) 30%) #FFF;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='166' height='157' viewBox='0 0 166 157'%3E%3Cdefs%3E%3ClinearGradient id='untitled-2-a' x1='0%25' y1='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23FFF' stop-opacity='.2'/%3E%3Cstop offset='100%25' stop-opacity='0'/%3E%3C/linearGradient%3E%3CradialGradient id='untitled-2-b' cx='0%25' cy='0%25' r='127.787%25' fx='0%25' fy='0%25' gradientTransform='matrix(.681 .68098 -.63326 .7323 0 0)'%3E%3Cstop offset='0%25' stop-color='%23BBB' stop-opacity='.1'/%3E%3Cstop offset='100%25' stop-opacity='.5'/%3E%3C/radialGradient%3E%3ClinearGradient id='untitled-2-c' x1='0%25' y1='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23FFF' stop-opacity='.4'/%3E%3Cstop offset='100%25' stop-opacity='0'/%3E%3C/linearGradient%3E%3CradialGradient id='untitled-2-d' cx='0%25' cy='0%25' r='148.851%25' fx='0%25' fy='0%25' gradientTransform='matrix(.6718 .67182 -.74072 .60932 0 0)'%3E%3Cstop offset='0%25' stop-color='%23FFF' stop-opacity='.101'/%3E%3Cstop offset='100%25' stop-opacity='.15'/%3E%3C/radialGradient%3E%3CradialGradient id='untitled-2-e' cx='0%25' cy='0%25' r='127.349%25' fx='0%25' fy='0%25' gradientTransform='matrix(.68331 .68332 -.73013 .63951 0 0)'%3E%3Cstop offset='0%25' stop-color='%23BBB' stop-opacity='.1'/%3E%3Cstop offset='100%25' stop-opacity='.5'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg opacity='.5' fill='none' fill-rule='evenodd' transform='matrix(-1 0 0 1 166 0)'%3E%3Cg opacity='.65' transform='matrix(0 -1 -1 0 146 157)'%3E%3Cpolygon fill='%23DD0A73' points='0 0 157 146 0 146' opacity='.418'/%3E%3Cpolygon fill='url(%23untitled-2-a)' points='0 0 157 146 0 146' style='mix-blend-mode:overlay'/%3E%3Cpolygon fill='url(%23untitled-2-b)' points='0 0 157 146 0 146' opacity='.618' style='mix-blend-mode:overlay'/%3E%3C/g%3E%3Cg opacity='.65' transform='translate(88 71)'%3E%3Cpath fill='%23017F75' d='M0,86 L78,86 C74.2038079,48.730962 43.6293886,16.7871605 0,0 L0,86 Z' opacity='.409'/%3E%3Cpath fill='url(%23untitled-2-c)' d='M0,86 L78,86 C74.2038079,48.730962 43.6293886,16.7871605 0,0 L0,86 Z' style='mix-blend-mode:overlay'/%3E%3Cpath fill='url(%23untitled-2-d)' d='M0,86 L78,86 C74.2038079,48.730962 43.6293886,16.7871605 0,0 L0,86 Z' opacity='.663' style='mix-blend-mode:overlay'/%3E%3C/g%3E%3Cg opacity='.15' transform='translate(73 79)'%3E%3Cpolygon fill='%23353535' points='0 0 73 78 0 78' opacity='.38'/%3E%3Cpolygon fill='url(%23untitled-2-a)' points='0 0 73 78 0 78' style='mix-blend-mode:overlay'/%3E%3Cpolygon fill='url(%23untitled-2-e)' points='0 0 73 78 0 78' style='mix-blend-mode:overlay'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A");
background-repeat: no-repeat;
background-position: calc(100% + 1px) calc(100% + 1px);
background-size: 37%;
}

.visNewVisDialog__body {
display: flex;
padding: $euiSizeM $euiSizeL 0;
}

.visNewVisDialog__searchWrapper {
flex-shrink: 0;
}

.visNewVisDialog__typesWrapper {
max-width: $euiSizeXXL * 10;
padding-top: 2px; // Account for search field dropshadow
padding-bottom: $euiSize;
// Add overflow shadows via pseudo elements
position: relative;
&::before,
&::after {
content: "";
display: block;
position: absolute;
height: $euiSizeXXL;
left: 0;
right: 0;
pointer-events: none;
}

&::before {
top: -$euiSizeXXL + 2px; // Account for search field dropshadow
@include euiOverflowShadowBottom;
}

&::after {
bottom: -$euiSizeL;
@include euiOverflowShadowTop;
}
}

.visNewVisDialog__types {
width: 400px;
@include euiScrollBar;
// EUITODO: allow for more (calculated) widths of `EuiKeyPadMenu`
width: auto;
overflow-y: auto;
padding-top: $euiSize;
justify-content: center;
padding-bottom: $euiSize;
}

.visNewVisDialog__description {
width: 380px;
padding: $euiSizeM;
}

.visNewVisDialog__body {
display: flex;
overflow-y: hidden;
width: $euiSizeXL * 10;
}

.visNewVisDialog__type:disabled {
Expand All @@ -32,7 +71,29 @@
}

@include euiBreakpoint('xs', 's') {
.visNewVisDialog {
background-image: none;
}

.visNewVisDialog__typesWrapper {
max-width: none;
}

.visNewVisDialog__types {
width: auto;
justify-content: flex-start;
}

.visNewVisDialog__description {
display: none;
}
}

@include internetExplorerOnly {
.visNewVisDialog {
width: 820px;
}

.visNewVisDialog__body {
flex-basis: 800px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class NewVisModal extends React.Component<TypeSelectionProps> {

return (
<EuiOverlayMask>
<EuiModal onClose={this.props.onClose} maxWidth={false} className="visNewVisDialog">
<EuiModal onClose={this.props.onClose} maxWidth={'100vw'} className="visNewVisDialog">
<TypeSelection
showExperimental={this.isLabsEnabled}
onVisTypeSelected={this.onVisTypeSelected}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import {
EuiIcon,
EuiKeyPadMenu,
EuiKeyPadMenuItemButton,
EuiModalBody,
EuiModalHeader,
EuiModalHeaderTitle,
EuiSpacer,
Expand Down Expand Up @@ -78,18 +77,19 @@ class TypeSelection extends React.Component<TypeSelectionProps, TypeSelectionSta
/>
</EuiModalHeaderTitle>
</EuiModalHeader>
<EuiFlexGroup gutterSize="none">
<EuiFlexItem grow={false}>
<EuiModalBody className="visNewVisDialog__body">
<EuiFlexGroup direction="column">
<EuiFlexItem grow={false}>
<div className="visNewVisDialog__body">
<EuiFlexGroup gutterSize="xl">
<EuiFlexItem>
<EuiFlexGroup direction="column" gutterSize="none" responsive={false}>
<EuiFlexItem grow={false} className="visNewVisDialog__searchWrapper">
<EuiFieldSearch
placeholder="Filter"
value={query}
onChange={this.onQueryChange}
fullWidth
/>
</EuiFlexItem>
<EuiFlexItem grow={true}>
<EuiFlexItem grow={1} className="visNewVisDialog__typesWrapper">
<EuiKeyPadMenu
className="visNewVisDialog__types"
data-test-subj="visNewDialogTypes"
Expand All @@ -98,26 +98,26 @@ class TypeSelection extends React.Component<TypeSelectionProps, TypeSelectionSta
</EuiKeyPadMenu>
</EuiFlexItem>
</EuiFlexGroup>
</EuiModalBody>
</EuiFlexItem>
<EuiFlexItem className="visNewVisDialog__description">
{highlightedType && <VisHelpText visType={highlightedType} />}
{!highlightedType && (
<React.Fragment>
<EuiTitle size="s">
<h2>
<FormattedMessage
id="kbn.visualize.newVisWizard.selectVisType"
defaultMessage="Select a visualization type"
/>
</h2>
</EuiTitle>
<EuiSpacer size="m" />
<NewVisHelp />
</React.Fragment>
)}
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem className="visNewVisDialog__description" grow={false}>
{highlightedType && <VisHelpText visType={highlightedType} />}
{!highlightedType && (
<React.Fragment>
<EuiTitle size="s">
<h2>
<FormattedMessage
id="kbn.visualize.newVisWizard.selectVisType"
defaultMessage="Select a visualization type"
/>
</h2>
</EuiTitle>
<EuiSpacer size="m" />
<NewVisHelp />
</React.Fragment>
)}
</EuiFlexItem>
</EuiFlexGroup>
</div>
</React.Fragment>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/vega/public/vega_type.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ VisTypesRegistryProvider.register((Private) => {
showQueryBar: true,
showFilterBar: true,
},
stage: 'lab',
stage: 'experimental',
feedbackMessage: defaultFeedbackMessage,
});
});