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

[explore v2] add scrollbar to control panel container #1284

Merged
merged 4 commits into from
Oct 7, 2016
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ const defaultProps = {
function ControlPanelsContainer(props) {
return (
<Panel>
{DefaultControls}
{VIZ_CONTROL_MAPPING[props.vizType]}
<div className="scrollbar-container">
<div className="scrollbar-content">
{DefaultControls}
{VIZ_CONTROL_MAPPING[props.vizType]}
</div>
</div>
</Panel>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ export default class ExploreViewContainer extends React.Component {
overflow: 'hidden',
}}
>
<div className="row table-body">
<div className="table-cell col-sm-4">
<div className="row">
<div className="col-sm-4">
<QueryAndSaveButtons
canAdd="True"
onQuery={() => {}}
/>
<br /><br />
<br />
<ControlPanelsContainer />
</div>
<div className="table-cell col-sm-8">
<div className="col-sm-8">
<ChartContainer
viz={this.props.data.viz}
height={this.state.height}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,22 @@ const propTypes = {
};

export default function QueryAndSaveBtns({ canAdd, onQuery }) {
const saveClasses = classnames('btn btn-default btn-sm', {
const saveClasses = classnames('btn btn-default btn-block btn-sm', {
'disabled disabledButton': canAdd !== 'True',
});

return (
<div className="btn-group query-and-save">
<button type="button" className="btn btn-primary btn-sm" onClick={onQuery}>
<div className="btn-group btn-group-justified query-and-save">
<a className="btn btn-primary btn-block btn-sm" onClick={onQuery}>
<i className="fa fa-bolt"></i> Query
</button>
<button
type="button"
</a>
<a
className={saveClasses}
data-target="#save_modal"
data-toggle="modal"
>
<i className="fa fa-plus-circle"></i> Save as
</button>
</a>
</div>
);
}
Expand Down
19 changes: 14 additions & 5 deletions caravel/assets/stylesheets/exploreV2/exploreV2.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
.table-body {
display: table;
.scrollbar-container {
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
}

.table-cell {
float: none;
display: table-cell;
.scrollbar-content {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
overflow: scroll;
margin-right: 0px;
margin-bottom: 100px;
}
2 changes: 1 addition & 1 deletion caravel/templates/caravel/explorev2.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "caravel/basic.html" %}
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/exploreV2/exploreV2.css" />

{% block body %}
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/explorev2/explorev2.css">
<div
id="js-explore-view-container"
data-bootstrap="{{ bootstrap_data }}"
Expand Down