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

Change visualization editor scroll to internal divs #4689

Merged
merged 2 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 8 additions & 7 deletions client/app/visualizations/components/EditVisualizationDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import PropTypes from "prop-types";
import Modal from "antd/lib/modal";
import Select from "antd/lib/select";
import Input from "antd/lib/input";
import * as Grid from "antd/lib/grid";
import { wrap as wrapDialog, DialogPropType } from "@/components/DialogWrapper";
import ErrorBoundary, { ErrorMessage } from "@/components/ErrorBoundary";
import Filters, { filterData } from "@/components/Filters";
Expand All @@ -15,6 +14,8 @@ import getQueryResultData from "@/lib/getQueryResultData";
import { VisualizationType } from "@/visualizations/prop-types";
import registeredVisualizations, { getDefaultVisualization, newVisualization } from "@/visualizations";

import "./EditVisualizationDialog.less";

function updateQueryVisualizations(query, visualization) {
const index = findIndex(query.visualizations, v => v.id === visualization.id);
if (index > -1) {
Expand Down Expand Up @@ -157,8 +158,8 @@ function EditVisualizationDialog({ dialog, visualization, query, queryResult })
onOk={save}
onCancel={dismiss}
wrapProps={{ "data-test": "EditVisualizationDialog" }}>
<Grid.Row gutter={24}>
<Grid.Col span={24} md={10}>
<div className="edit-visualization-dialog">
<div className="visualization-settings">
<div className="m-b-15">
<label htmlFor="visualization-type">Visualization Type</label>
<Select
Expand Down Expand Up @@ -188,8 +189,8 @@ function EditVisualizationDialog({ dialog, visualization, query, queryResult })
<div data-test="VisualizationEditor">
<Editor data={data} options={options} visualizationName={name} onOptionsChange={onOptionsChanged} />
</div>
</Grid.Col>
<Grid.Col span={24} md={14}>
</div>
<div className="visualization-preview">
<label htmlFor="visualization-preview" className="invisible hidden-xs">
Preview
</label>
Expand All @@ -207,8 +208,8 @@ function EditVisualizationDialog({ dialog, visualization, query, queryResult })
/>
</ErrorBoundary>
</div>
</Grid.Col>
</Grid.Row>
</div>
</div>
</Modal>
);
}
Expand Down
18 changes: 18 additions & 0 deletions client/app/visualizations/components/EditVisualizationDialog.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@media (min-width: 992px) {
.edit-visualization-dialog {
display: flex;
height: 100%;

.visualization-settings {
padding: 0px 12px;
width: 40%;
overflow: auto;
}

.visualization-preview {
padding: 0px 12px;
kravets-levko marked this conversation as resolved.
Show resolved Hide resolved
width: 60%;
overflow: auto;
}
}
}