Skip to content
Open
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import styles from "../../index.module.css";
import TimeRangeInput from "../../TimeRangeInput";
import QueryInput from "../QueryInput";
import SearchButton from "../SearchButton";


/**
* Renders CLP search controls.
*
* @return
*/
const ClpControls = () => (
<div className={styles["inputsAndButtonRow"]}>
<QueryInput/>
<TimeRangeInput/>
<SearchButton/>
</div>
);

export default ClpControls;
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Dataset from "../../Dataset";
import TimeRangeInput from "../../TimeRangeInput";
import QueryInput from "../QueryInput";
import SearchButton from "../SearchButton";
import nativeStyles from "./index.module.css";


/**
* Renders CLP-S controls.
*
* @return
*/
const ClpSControls = () => (
<>
<div className={nativeStyles["clpSRow"]}>
<Dataset/>
<div className={nativeStyles["clpSTimeRange"]}>
<TimeRangeInput/>
</div>
</div>
<div className={nativeStyles["clpSRow"]}>
<div className={nativeStyles["clpSQuery"]}>
<QueryInput/>
</div>
<SearchButton/>
</div>
</>
);

export default ClpSControls;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.clpSRow {
display: flex;
gap: 10px;
}
Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider adding vertical alignment.

The .clpSRow flex container lacks align-items, which may cause inconsistent vertical alignment if child elements (search input, buttons, selectors) have different heights. Consider adding align-items: center; for consistent vertical centering.

Additionally, since flex-wrap defaults to nowrap, the controls might overflow horizontally on narrow screens.

♻️ Proposed enhancement
 .clpSRow {
     display: flex;
     gap: 10px;
+    align-items: center;
 }

Please verify the layout behaviour on small screens (mobile/tablet viewports) to ensure controls remain accessible and don't overflow.

🤖 Prompt for AI Agents
In
@components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.module.css
around lines 1 - 4, The .clpSRow flex container is missing vertical alignment
and wrap behavior; update the .clpSRow rule to add align-items: center to
vertically center child controls and add flex-wrap: wrap (and optionally adjust
gap or introduce a responsive media query) so the controls don’t overflow on
narrow viewports—verify in mobile/tablet sizes that elements wrap cleanly and
remain accessible.


.clpSTimeRange {
margin-left: auto;
}

.clpSQuery {
flex: 1;
min-width: 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import {CLP_STORAGE_ENGINES} from "@webui/common/config";

import {SETTINGS_STORAGE_ENGINE} from "../../../../../config";
import styles from "../../index.module.css";
import QueryStatus from "../../QueryStatus";
import ClpControls from "./ClpControls";
import ClpSControls from "./ClpSControls";


/**
* Chooses between clp and clp-s native control layouts.
*
* @return
*/
const NativeControls = () => {
const isClpS = CLP_STORAGE_ENGINES.CLP_S === SETTINGS_STORAGE_ENGINE;

return (
<div className={styles["searchControlsContainer"]}>
{isClpS ?
<ClpSControls/> :
<ClpControls/>}
<div className={styles["status"]}>
<QueryStatus/>
</div>
</div>
);
};

export default NativeControls;
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ const CancelButton = () => {
icon={<CloseOutlined/>}
size={"middle"}
type={"primary"}
onClick={handleCancelButtonClick}
>
Cancel
</Button>
onClick={handleCancelButtonClick}/>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,7 @@ const SubmitButton = () => {
handleSubmitButtonClick().catch((err: unknown) => {
throw err;
});
}}
>
Search
</Button>
}}/>
</Tooltip>
);
};
Expand Down
Loading