Skip to content

Commit

Permalink
Change visualization editor scroll to internal divs (#4689)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldutra authored Feb 26, 2020
1 parent c5f14e5 commit 5fa5cd9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
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-right: 12px;
width: 40%;
overflow: auto;
}

.visualization-preview {
padding-left: 12px;
width: 60%;
overflow: auto;
}
}
}

0 comments on commit 5fa5cd9

Please sign in to comment.