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

Make the query window wider #241

Merged
merged 2 commits into from
Dec 4, 2021
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
35 changes: 0 additions & 35 deletions src/mqueryfront/src/components/ToggleLayoutButton.js

This file was deleted.

23 changes: 14 additions & 9 deletions src/mqueryfront/src/query/QueryLayoutManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import React from "react";
import QueryField from "./QueryField";
import QueryResultsStatus from "./QueryResultsStatus";
import QueryParseStatus from "./QueryParseStatus";
import ToggleLayoutButton from "../components/ToggleLayoutButton";
// import ToggleLayoutButton from "../components/ToggleLayoutButton";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAlignLeft } from "@fortawesome/free-solid-svg-icons";
import ErrorPage from "../components/ErrorPage";
import LoadingPage from "../components/LoadingPage";
import PropTypes from "prop-types";
Expand Down Expand Up @@ -38,11 +40,14 @@ const QueryLayoutManager = (props) => {

const queryResults = job ? (
<div>
<ToggleLayoutButton
buttonClass="btn btn-primary btn-sm pull-left mr-4"
<button
type="button"
className="btn btn-primary btn-sm pull-left mr-4"
onClick={onCollapsePane}
label={isCollapsed ? "Show query" : "Hide query"}
/>
>
<FontAwesomeIcon icon={faAlignLeft} />
{isCollapsed ? "Show query" : "Hide query"}
</button>
<QueryResultsStatus
qhash={qhash}
job={job}
Expand All @@ -55,8 +60,10 @@ const QueryLayoutManager = (props) => {
<LoadingPage />
);

const queryResultOrParse = qhash ? queryResults : queryParse;

const queryFieldPane = isCollapsed ? null : (
<div className="col-md-5">
<div className={queryResultOrParse ? "col-md-6" : "col-md-12"}>
<QueryField
readOnly={!!qhash}
onSubmitQuery={onSubmitQuery}
Expand All @@ -72,8 +79,6 @@ const QueryLayoutManager = (props) => {
</div>
);

const queryResultOrParse = qhash ? queryResults : queryParse;

return (
<div className="container-fluid">
<div className="row wrapper">
Expand All @@ -82,7 +87,7 @@ const QueryLayoutManager = (props) => {
className={
isCollapsed
? "col-md-12"
: "col-md-7 order-first order-md-last"
: "col-md-6 order-first order-md-last"
}
>
{queryResultOrParse}
Expand Down