-
Notifications
You must be signed in to change notification settings - Fork 83
feat(webui): Add SQL input boxes to guided presto UI. #1300
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
Changes from 18 commits
004a12d
7194d78
d5fc91f
dc79169
52e83a3
630a360
aa3968c
fb61505
af4a2b0
202d002
6aa31be
2cc9f2f
e30211e
a8daeb2
148379c
d8ec46c
84a5840
6c3a065
8da8133
cfae7cc
7a3b7f9
8d41f91
10f9a2d
1f2a97d
96b46a1
7eb61ac
847da48
0631199
96e8965
0db25b1
a18abc3
c5d1256
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,11 @@ | ||||||||||||||
| .datasetLabel { | ||||||||||||||
| min-width: 80px; | ||||||||||||||
| .label { | ||||||||||||||
| height: 100%; | ||||||||||||||
| display: flex; | ||||||||||||||
| padding-left: 10px; | ||||||||||||||
| padding-right: 10px; | ||||||||||||||
| align-items: center; | ||||||||||||||
| justify-content: center; | ||||||||||||||
| border-top-right-radius: 0px; | ||||||||||||||
| border-bottom-right-radius: 0px; | ||||||||||||||
|
||||||||||||||
| border-top-right-radius: 0px; | |
| border-bottom-right-radius: 0px; | |
| border-top-right-radius: 0; | |
| border-bottom-right-radius: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Prevent label overflow on narrow layouts
white-space: nowrap can cause overflow/clipping. Add ellipsis and hide overflow.
.label {
@@
- white-space: nowrap;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| white-space: nowrap; | |
| .label { | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } |
🤖 Prompt for AI Agents
In components/webui/client/src/components/InputLabel/index.module.css around
line 10, the rule using "white-space: nowrap" can cause label overflow/clipping
on narrow layouts; update the CSS to prevent overflow by adding "overflow:
hidden;" and "text-overflow: ellipsis;" alongside or replacing the existing
property so long labels are truncated with an ellipsis instead of overflowing.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,27 +9,29 @@ import styles from "./index.module.css"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const {Text} = Typography; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Renders a label for the dataset selector. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Renders a label for an input field. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @param props | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @param props.children The label text to display. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @return | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
11
to
16
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Document a11y props. Add docs for /**
- * Renders a label for an input field.
+ * Renders a label for an input field.
*
- * @param props
- * @param props.children The label text to display.
+ * @param props
+ * @param props.children The label text to display.
+ * @param props.as Render as a native "label" or as a "span" (Typography.Text). Default: "span".
+ * @param props.htmlFor When as="label", associates the label to a control id.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const DatasetLabel = () => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const InputLabel = ({children}: {children: React.ReactNode}) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const {token} = theme.useToken(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| className={styles["datasetLabel"] || ""} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| className={styles["label"] || ""} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Remove CSS modules always yield a string; the fallback is unnecessary and was removed in the diff above. 🤖 Prompt for AI Agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Drop redundant fallback
- className={styles["label"] || ""}
+ className={styles.label}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| style={{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backgroundColor: token.colorFillTertiary, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| borderBottomLeftRadius: `${token.borderRadius}px`, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| borderColor: token.colorBorder, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| borderTopLeftRadius: `${token.borderRadius}px`, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fontSize: token.fontSizeLG, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fontSize: token.fontSize, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Dataset | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {children} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </Text> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
18
to
33
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Enable semantic rendering and clean className handling. This improves accessibility and removes the unnecessary -const InputLabel = ({children}: {children: React.ReactNode}) => {
+type InputLabelProps = {
+ children: React.ReactNode;
+ as?: "span" | "label";
+ htmlFor?: string;
+ id?: string;
+ className?: string;
+};
+
+const InputLabel = ({children, as = "span", htmlFor, id, className}: InputLabelProps) => {
const {token} = theme.useToken();
- return (
- <Text
- className={styles["label"] || ""}
- style={{
- backgroundColor: token.colorFillTertiary,
- borderBottomLeftRadius: `${token.borderRadius}px`,
- borderColor: token.colorBorder,
- borderTopLeftRadius: `${token.borderRadius}px`,
- fontSize: token.fontSize,
- }}
- >
- {children}
- </Text>
- );
+ const commonProps = {
+ id,
+ className: `${styles.label} ${className ?? ""}`.trim(),
+ style: {
+ backgroundColor: token.colorFillTertiary,
+ borderBottomLeftRadius: `${token.borderRadius}px`,
+ borderColor: token.colorBorder,
+ borderTopLeftRadius: `${token.borderRadius}px`,
+ fontSize: token.fontSize,
+ } as React.CSSProperties,
+ };
+
+ return as === "label" ? (
+ <label {...commonProps} htmlFor={htmlFor}>
+ {children}
+ </label>
+ ) : (
+ <Text {...commonProps}>
+ {children}
+ </Text>
+ );📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Comment on lines
21
to
33
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Use semantic and add a visible border Improves accessibility (associable via -const InputLabel = ({children}: {children: React.ReactNode}) => {
+type InputLabelProps = {
+ children: React.ReactNode;
+ htmlFor?: string;
+ className?: string;
+};
+
+const InputLabel = ({children, htmlFor, className}: InputLabelProps) => {
const {token} = theme.useToken();
return (
- <Text
- className={styles["label"] || ""}
+ <label
+ htmlFor={htmlFor}
+ className={`${styles.label} ${className ?? ""}`}
style={{
backgroundColor: token.colorFillTertiary,
borderBottomLeftRadius: `${token.borderRadius}px`,
- borderColor: token.colorBorder,
+ border: `1px solid ${token.colorBorder}`,
borderTopLeftRadius: `${token.borderRadius}px`,
fontSize: token.fontSize,
}}
>
{children}
- </Text>
+ </label>
);
};📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export default DatasetLabel; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export default InputLabel; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this change directly related to the current PR?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indirectly related but needed. Kirk decided he prefers the smaller 14 font. So i'm moving both UI to the smaller font, which will simplify code and components reuse. Unfortunately, this icon is too big for the smaller input, so it needed to be a bit smaller. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,3 @@ | ||||||||||||||||||||||||||||||||||||
| .customButton { | ||||||||||||||||||||||||||||||||||||
| height: 22px; | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
| .customButton { | |
| height: 22px; | |
| } | |
| .customButton { | |
| height: 22px; | |
| line-height: 22px; | |
| } |
🤖 Prompt for AI Agents
In
components/webui/client/src/components/QueryBox/InputWithCaseSensitive/index.module.css
around lines 1-3, the .customButton rule only sets height which can cause text
clipping on some fonts/OS; add line-height: 22px to match the height so text
vertically centers and doesn't clip, and optionally ensure display is
inline-block (or block) and vertical-align: middle if needed for alignment.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Avoid fixed pixel height; use Ant Design token to match theme.
Use the small control height variable so this stays in sync across themes.
-.customButton {
- height: 22px;
-}
+.customButton {
+ height: var(--ant-control-height-sm);
+ line-height: var(--ant-control-height-sm);
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .customButton { | |
| height: 22px; | |
| } | |
| .customButton { | |
| height: var(--ant-control-height-sm); | |
| line-height: var(--ant-control-height-sm); | |
| } |
🤖 Prompt for AI Agents
In
components/webui/client/src/components/QueryBox/InputWithCaseSensitive/index.module.css
around lines 1–3, the .customButton rule uses a fixed height: 22px; replace this
with the Ant Design small control height token so the button follows theme
changes (e.g., use the ANTD token/variable for control height small via CSS
variable or Less variable such as the small control height token), ensure the
selector preserves specificity and add any necessary line-height/vertical-align
adjustments so the button content remains centered.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | |
| } | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,9 +78,13 @@ const SqlEditor = (props: SqlEditorProps) => { | |
| style={{ | ||
| border: `1px solid ${token.colorBorder}`, | ||
| borderRadius: token.borderRadius, | ||
| height: "100%", | ||
| minHeight: 0, | ||
| minWidth: 0, | ||
|
||
| pointerEvents: disabled ? | ||
| "none" : | ||
| "auto", | ||
| width: "100%", | ||
| }} | ||
|
Comment on lines
86
to
89
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Prefer read-only over pointer-events: none to keep copy/select enabled. Disabling pointer events prevents users from selecting/copying SQL when disabled. Suggest using Monaco’s readOnly instead and leaving pointer events on. Proposed change: - pointerEvents: disabled ?
- "none" :
- "auto",
+ // Keep interactions for selection/copy; enforce readOnly via editor options.
+ pointerEvents: "auto",And merge readOnly into options: <Editor
language={"sql"}
+ options={{
+ ...(editorProps.options ?? {}),
+ readOnly: disabled,
+ }}
loading={
<divAlso applies to: 90-105 🤖 Prompt for AI Agents |
||
| > | ||
| <Editor | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,11 +4,12 @@ import {useQuery} from "@tanstack/react-query"; | |||||||||||
| import { | ||||||||||||
| message, | ||||||||||||
| Select, | ||||||||||||
| theme, | ||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||
| } from "antd"; | ||||||||||||
|
|
||||||||||||
| import InputLabel from "../../../../components/InputLabel"; | ||||||||||||
| import useSearchStore from "../../SearchState/index"; | ||||||||||||
| import {SEARCH_UI_STATE} from "../../SearchState/typings"; | ||||||||||||
| import DatasetLabel from "./DatasetLabel"; | ||||||||||||
| import styles from "./index.module.css"; | ||||||||||||
| import {fetchDatasetNames} from "./sql"; | ||||||||||||
|
|
||||||||||||
|
|
@@ -22,6 +23,7 @@ const Dataset = () => { | |||||||||||
| const dataset = useSearchStore((state) => state.selectDataset); | ||||||||||||
| const updateDataset = useSearchStore((state) => state.updateSelectDataset); | ||||||||||||
| const searchUiState = useSearchStore((state) => state.searchUiState); | ||||||||||||
| const {token} = theme.useToken(); | ||||||||||||
|
|
||||||||||||
| const [messageApi, contextHolder] = message.useMessage(); | ||||||||||||
|
|
||||||||||||
|
|
@@ -79,7 +81,7 @@ const Dataset = () => { | |||||||||||
| return ( | ||||||||||||
| <div className={styles["datasetContainer"]}> | ||||||||||||
| {contextHolder} | ||||||||||||
| <DatasetLabel/> | ||||||||||||
| <InputLabel>Dataset</InputLabel> | ||||||||||||
| <Select | ||||||||||||
|
Comment on lines
+82
to
83
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Wire up accessible labelling between label and Select. Expose the label via id and reference it from Select for screen readers. Apply: - <InputLabel>Dataset</InputLabel>
+ <InputLabel id="dataset-label">Dataset</InputLabel>
<Select
+ aria-labelledby="dataset-label"Please confirm 📝 Committable suggestion
Suggested change
|
||||||||||||
| className={styles["select"] || ""} | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Remove redundant fallback in className.
- className={styles["select"] || ""}
+ className={styles["select"]}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Drop redundant fallback in className. CSS modules yield a string; the Apply: - className={styles["select"] || ""}
+ className={styles.select}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| loading={isPending} | ||||||||||||
|
|
||||||||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||||||||||||||||||
| import InputLabel from "../../../../../components/InputLabel"; | ||||||||||||||||||||||
| import SqlInput from "../../../../../components/SqlInput"; | ||||||||||||||||||||||
| import guidedGrid from "./index.module.css"; | ||||||||||||||||||||||
|
Comment on lines
+1
to
+3
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Prefer import aliases. Same rationale as above. 🤖 Prompt for AI Agents |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /** | ||||||||||||||||||||||
| * Renders the FROM SQL input field. | ||||||||||||||||||||||
| * | ||||||||||||||||||||||
| * @return | ||||||||||||||||||||||
| */ | ||||||||||||||||||||||
|
Comment on lines
+6
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick Complete the JSDoc and align with return type. Document the return type; optionally annotate the function for stronger typing. /**
* Renders the FROM SQL input field.
*
- * @return
+ * @return JSX.Element
*/📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| const From = () => ( | ||||||||||||||||||||||
| <div className={guidedGrid["from"]}> | ||||||||||||||||||||||
| <InputLabel> FROM </InputLabel> | ||||||||||||||||||||||
|
||||||||||||||||||||||
| <InputLabel> FROM </InputLabel> | |
| <InputLabel>FROM</InputLabel> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Same cleanups: no whitespace padding, no redundant prop, dot-notation.
- <div className={guidedGrid["from"]}>
- <InputLabel> FROM </InputLabel>
- <SqlInput disabled={false}/>
+ <div className={guidedGrid.from}>
+ <InputLabel>FROM</InputLabel>
+ <SqlInput />📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div className={guidedGrid["from"]}> | |
| <InputLabel> FROM </InputLabel> | |
| <SqlInput disabled={false}/> | |
| </div> | |
| <div className={guidedGrid.from}> | |
| <InputLabel>FROM</InputLabel> | |
| <SqlInput /> | |
| </div> |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/From.tsx
around lines 12 to 15, clean up the JSX by removing the extra whitespace inside
the InputLabel so it reads "FROM" (no surrounding spaces), drop the redundant
disabled={false} prop on SqlInput (it's the default), and use dot-notation for
the className: change guidedGrid["from"] to guidedGrid.from; make those three
minimal edits in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Add accessible association between label and editor
Apply the same id/aria-labelledby pattern as suggested for Select.
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/From.tsx
around lines 12-15, the InputLabel is not programmatically associated with the
SqlInput; add an explicit id/label association by generating or passing a stable
id (e.g., via React's useId or a prop), set that id on the SqlInput, and set the
InputLabel to reference it (use htmlFor on InputLabel or aria-labelledby
pointing to the label id) so assistive tech can correctly associate the label
with the editor.
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import {Select as AntdSelect} from "antd"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import InputLabel from "../../../../../components/InputLabel"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import guidedGrid from "./index.module.css"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const LIMIT_OPTIONS = [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {value: 10, label: "10"}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {value: 50, label: "50"}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {value: 100, label: "100"}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {value: 500, label: "500"}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {value: 1000, label: "1000"}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+7
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick Optional: expose and reuse a DEFAULT_LIMIT constant. Reduces magic numbers and keeps builders/tests consistent. const LIMIT_OPTIONS: { value: number; label: string }[] = [
{value: 10, label: "10"},
@@
];
+
+export const DEFAULT_LIMIT = 10;And use it: - <Select<number>
+ <Select<number>
aria-labelledby="limit-label"
- value={value ?? LIMIT_OPTIONS[0].value}
+ value={value ?? DEFAULT_LIMIT}Also applies to: 21-31 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Renders the LIMIT SQL input field. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @return | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const Limit = () => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className={guidedGrid["limit"]}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <InputLabel> LIMIT </InputLabel> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <InputLabel> LIMIT </InputLabel> | |
| <InputLabel>LIMIT</InputLabel> |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove the left border radius? e.g.,
.noLeftBorderRadius :global(.ant-select-selector) {
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
}
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possible to create a class for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Persist and disable the control appropriately.
Currently uncontrolled and always enabled. Derive disabled from search state, and (optionally) expose the selected value to whatever composes the SQL.
import InputLabel from "../../../../../components/InputLabel";
import guidedGrid from "./index.module.css";
+import useSearchStore from "../../../SearchState/index";
+import {SEARCH_UI_STATE} from "../../../SearchState/typings";
const LIMIT_OPTIONS = [
@@
-const Limit = () => (
- <div className={guidedGrid["limit"]}>
- <InputLabel> LIMIT </InputLabel>
- <AntdSelect
- defaultValue={LIMIT_OPTIONS[0]?.value}
- options={LIMIT_OPTIONS}
- style={{width: "100%"}}/>
- </div>
-);
+const Limit = () => {
+ const searchUiState = useSearchStore((state) => state.searchUiState);
+ const disabled =
+ searchUiState === SEARCH_UI_STATE.QUERY_ID_PENDING ||
+ searchUiState === SEARCH_UI_STATE.QUERYING;
+ return (
+ <div className={guidedGrid["limit"]}>
+ <InputLabel>LIMIT</InputLabel>
+ <AntdSelect
+ defaultValue={LIMIT_OPTIONS[0]?.value}
+ options={LIMIT_OPTIONS}
+ size={"middle"}
+ disabled={disabled}
+ style={{width: "100%"}}/>
+ </div>
+ );
+};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div className={guidedGrid["limit"]}> | |
| <InputLabel> LIMIT </InputLabel> | |
| <AntdSelect | |
| defaultValue={LIMIT_OPTIONS[0]?.value} | |
| options={LIMIT_OPTIONS} | |
| style={{width: "100%"}}/> | |
| </div> | |
| import InputLabel from "../../../../../components/InputLabel"; | |
| import guidedGrid from "./index.module.css"; | |
| import useSearchStore from "../../../SearchState/index"; | |
| import {SEARCH_UI_STATE} from "../../../SearchState/typings"; | |
| const Limit = () => { | |
| const searchUiState = useSearchStore((state) => state.searchUiState); | |
| const disabled = | |
| searchUiState === SEARCH_UI_STATE.QUERY_ID_PENDING || | |
| searchUiState === SEARCH_UI_STATE.QUERYING; | |
| return ( | |
| <div className={guidedGrid["limit"]}> | |
| <InputLabel>LIMIT</InputLabel> | |
| <AntdSelect | |
| defaultValue={LIMIT_OPTIONS[0]?.value} | |
| options={LIMIT_OPTIONS} | |
| size={"middle"} | |
| disabled={disabled} | |
| style={{width: "100%"}}/> | |
| </div> | |
| ); | |
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Make LIMIT selectable value controllable + align height with grid
Expose value/onChange to parent and align control height with grid; also add an accessible label.
-const Limit = () => (
- <div className={guidedGrid["limit"]}>
- <InputLabel> LIMIT </InputLabel>
- <AntdSelect
- defaultValue={LIMIT_OPTIONS[0]?.value}
- options={LIMIT_OPTIONS}
- style={{width: "100%"}}/>
- </div>
-);
+type LimitProps = {
+ value?: number;
+ onChange?: (v: number) => void;
+};
+
+const Limit = ({value, onChange}: LimitProps) => (
+ <div className={guidedGrid["limit"]}>
+ <InputLabel>LIMIT</InputLabel>
+ <AntdSelect<number>
+ aria-label="LIMIT"
+ value={value}
+ onChange={onChange}
+ options={LIMIT_OPTIONS}
+ size="middle"
+ style={{width: "100%"}} />
+ </div>
+);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div className={guidedGrid["limit"]}> | |
| <InputLabel> LIMIT </InputLabel> | |
| <AntdSelect | |
| defaultValue={LIMIT_OPTIONS[0]?.value} | |
| options={LIMIT_OPTIONS} | |
| style={{width: "100%"}}/> | |
| </div> | |
| type LimitProps = { | |
| value?: number; | |
| onChange?: (v: number) => void; | |
| }; | |
| const Limit = ({value, onChange}: LimitProps) => ( | |
| <div className={guidedGrid["limit"]}> | |
| <InputLabel>LIMIT</InputLabel> | |
| <AntdSelect<number> | |
| aria-label="LIMIT" | |
| value={value} | |
| onChange={onChange} | |
| options={LIMIT_OPTIONS} | |
| size="middle" | |
| style={{width: "100%"}} /> | |
| </div> | |
| ); |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Limit.tsx
around lines 21-27, the LIMIT select is currently uncontrolled, lacks an
accessible label association, and its visual height doesn't match the
surrounding grid; change the component to accept value and onChange props from
the parent (add to the props/interface: value?: string|number, onChange?: (v:
string|number) => void), remove the unconditional defaultValue use and pass the
controlled value prop into AntdSelect, wire AntdSelect's onChange to call
props.onChange, add an id on the select and set InputLabel's htmlFor to that id
for accessibility, and make the select fill the grid cell height (e.g., style={{
width: '100%', height: '100%' }} or apply the component/grid CSS class to align
heights).
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import InputLabel from "../../../../../components/InputLabel"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import SqlInput from "../../../../../components/SqlInput"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import guidedGrid from "./index.module.css"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+3
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick Switch deep relative imports to path aliases Use the repo’s configured TS path aliases for resilience to moves and shorter imports. What alias should these resolve to in this project (e.g., @components/InputLabel)? I can provide a committable diff once confirmed. 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Renders the ORDER BY SQL input field. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @return | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+6
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick Tighten JSDoc: specify return type. -/**
- * Renders the ORDER BY SQL input field.
- *
- * @return
- */
+/**
+ * Renders the ORDER BY SQL input field.
+ *
+ * @returns JSX.Element
+ */📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const OrderBy = () => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className={guidedGrid["order"]}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <InputLabel> ORDER BY </InputLabel> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <InputLabel> ORDER BY </InputLabel> | |
| <InputLabel>ORDER BY</InputLabel> |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/OrderBy.tsx
around line 13, the InputLabel contains hard-coded leading/trailing spaces ("
ORDER BY "); remove those extra spaces and adjust the component to apply spacing
via CSS (e.g., margin/padding or a className on the label or surrounding
container) so the visual gap is controlled by styles and remains i18n-safe.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <InputLabel> ORDER BY </InputLabel> | |
| <InputLabel>ORDER BY</InputLabel> |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Wire disabled state to search UI state.
Hard-coding disabled={false} can allow edits during QUERYING. Recommend deriving disabled from the store for consistency with other controls.
Apply this diff:
import InputLabel from "../../../../../components/InputLabel";
import SqlInput from "../../../../../components/SqlInput";
import guidedGrid from "./index.module.css";
+import useSearchStore from "../../../SearchState/index";
+import {SEARCH_UI_STATE} from "../../../SearchState/typings";
-const OrderBy = () => (
- <div className={guidedGrid["order"]}>
- <InputLabel> ORDER BY </InputLabel>
- <SqlInput disabled={false}/>
- </div>
-);
+const OrderBy = () => {
+ const searchUiState = useSearchStore((state) => state.searchUiState);
+ const disabled =
+ searchUiState === SEARCH_UI_STATE.QUERY_ID_PENDING ||
+ searchUiState === SEARCH_UI_STATE.QUERYING;
+ return (
+ <div className={guidedGrid["order"]}>
+ <InputLabel>ORDER BY</InputLabel>
+ <SqlInput disabled={disabled}/>
+ </div>
+ );
+};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <InputLabel> ORDER BY </InputLabel> | |
| <SqlInput disabled={false}/> | |
| </div> | |
| import InputLabel from "../../../../../components/InputLabel"; | |
| import SqlInput from "../../../../../components/SqlInput"; | |
| import guidedGrid from "./index.module.css"; | |
| import useSearchStore from "../../../SearchState/index"; | |
| import {SEARCH_UI_STATE} from "../../../SearchState/typings"; | |
| const OrderBy = () => { | |
| const searchUiState = useSearchStore((state) => state.searchUiState); | |
| const disabled = | |
| searchUiState === SEARCH_UI_STATE.QUERY_ID_PENDING || | |
| searchUiState === SEARCH_UI_STATE.QUERYING; | |
| return ( | |
| <div className={guidedGrid["order"]}> | |
| <InputLabel>ORDER BY</InputLabel> | |
| <SqlInput disabled={disabled}/> | |
| </div> | |
| ); | |
| }; |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/OrderBy.tsx
around lines 13-15, the SqlInput is hard-coded with disabled={false}; instead,
read the disabled state from the search UI store (e.g.,
isQuerying/controlsDisabled via the existing selector or hook used by other
controls) and pass that value into SqlInput so the control is disabled during
querying; ensure you import and use the same selector/hook pattern as the other
controls for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Provide ARIA linkage between label and editor
Same a11y guidance as in Select: id on InputLabel + aria-labelledby on SqlInput (or extend SqlInput to accept aria props).
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/OrderBy.tsx
around lines 12 to 15, the InputLabel is not programmatically linked to the
SqlInput for accessibility; add an id on the InputLabel (e.g., generated via
useId or a unique constant) and set the SqlInput to reference that id via
aria-labelledby (or update SqlInput to accept and forward aria props and pass
aria-labelledby). Ensure the id is unique in the DOM and that SqlInput receives
the aria attribute so screen readers associate the label with the editor.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Trim spaces and remove redundant prop
Consistent labelling; fewer needless props.
- <InputLabel> ORDER BY </InputLabel>
- <SqlInput disabled={false}/>
+ <InputLabel>ORDER BY</InputLabel>
+ <SqlInput/>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <InputLabel> ORDER BY </InputLabel> | |
| <SqlInput disabled={false}/> | |
| </div> | |
| <InputLabel>ORDER BY</InputLabel> | |
| <SqlInput/> | |
| </div> |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/OrderBy.tsx
around lines 13 to 15, the ORDER BY label contains extra surrounding spaces and
the SqlInput includes a redundant disabled={false} prop; trim the label text to
"ORDER BY" (no leading/trailing spaces) and remove the disabled={false} prop
from the SqlInput so the markup is consistent and free of needless props.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||||||||||||||||||||||||||
| import InputLabel from "../../../../../components/InputLabel"; | ||||||||||||||||||||||||||||||
| import SqlInput from "../../../../../components/SqlInput"; | ||||||||||||||||||||||||||||||
| import guidedGrid from "./index.module.css"; | ||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+3
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Prefer import aliases. Same rationale as in Where.tsx. See tsconfig check script there. 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||
| * Renders the SELECT SQL input field. | ||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||
| * @return | ||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||
| const Select = () => ( | ||||||||||||||||||||||||||||||
| <div className={guidedGrid["select"]}> | ||||||||||||||||||||||||||||||
| <InputLabel> SELECT </InputLabel> | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| <InputLabel> SELECT </InputLabel> | |
| <InputLabel>SELECT</InputLabel> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Same cleanups as WHERE: remove padding spaces, redundant prop, and use dot-notation.
- <div className={guidedGrid["select"]}>
- <InputLabel> SELECT </InputLabel>
- <SqlInput disabled={false}/>
+ <div className={guidedGrid.select}>
+ <InputLabel>SELECT</InputLabel>
+ <SqlInput />📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div className={guidedGrid["select"]}> | |
| <InputLabel> SELECT </InputLabel> | |
| <SqlInput disabled={false}/> | |
| </div> | |
| <div className={guidedGrid.select}> | |
| <InputLabel>SELECT</InputLabel> | |
| <SqlInput /> | |
| </div> |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Select.tsx
around lines 12 to 15, clean up the JSX: remove the extra spaces inside the
InputLabel text (change " SELECT " to "SELECT"), remove the redundant prop
disabled={false} from SqlInput, and replace bracket notation
guidedGrid["select"] with dot-notation guidedGrid.select; make these minimal
edits in-place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Add accessible labelling for the editor
If SqlInput forwards ARIA props, link the label and input (e.g., id on InputLabel + aria-labelledby on SqlInput). Otherwise, consider extending SqlInput to accept aria-label/aria-labelledby.
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Select.tsx
around lines 12–15, the label and the SqlInput are not programmatically
associated; update the markup so the InputLabel has a unique id and the SqlInput
is given an accessible reference (either aria-labelledby pointing to that id or
an aria-label). If SqlInput currently doesn't forward ARIA props, modify the
SqlInput component to accept and forward aria-label/aria-labelledby (and id if
needed) to the underlying editable element, then wire InputLabel's id and
SqlInput's aria-labelledby in this file.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Trim extra spaces in label and drop redundant disabled prop
Removes noise; behaviour unchanged.
- <InputLabel> SELECT </InputLabel>
- <SqlInput disabled={false}/>
+ <InputLabel>SELECT</InputLabel>
+ <SqlInput/>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <InputLabel> SELECT </InputLabel> | |
| <SqlInput disabled={false}/> | |
| </div> | |
| <InputLabel>SELECT</InputLabel> | |
| <SqlInput/> | |
| </div> |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Select.tsx
around lines 13 to 15, the InputLabel contains extra surrounding spaces ("
SELECT ") and SqlInput includes a redundant disabled={false} prop; remove the
extra spaces so the label reads "SELECT" and delete the disabled prop to rely on
the default behaviour.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||||||||||||||||||||||||||
| import InputLabel from "../../../../../components/InputLabel"; | ||||||||||||||||||||||||||||||
| import SqlInput from "../../../../../components/SqlInput"; | ||||||||||||||||||||||||||||||
| import guidedGrid from "./index.module.css"; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||
| * Renders the WHERE SQL input field. | ||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||
| * @return | ||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||
| const Where = () => ( | ||||||||||||||||||||||||||||||
| <div className={guidedGrid["where"]}> | ||||||||||||||||||||||||||||||
| <InputLabel> WHERE </InputLabel> | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| <InputLabel> WHERE </InputLabel> | |
| <InputLabel>WHERE</InputLabel> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
A11y: make the label programmatic and associate it to the input.
Once InputLabel supports rendering a native label (see comment in InputLabel file), associate them via htmlFor/id.
- <InputLabel>WHERE</InputLabel>
- <SqlInput />
+ <InputLabel as="label" htmlFor="presto-where">WHERE</InputLabel>
+ <SqlInput id="presto-where" />Verify SqlInput forwards id to the focusable element:
🏁 Script executed:
#!/bin/bash
# Check SqlInput props and id forwarding
rg -n -C3 'export default function SqlInput|function SqlInput|const SqlInput' components/webui/client/src/components/SqlInput
rg -n -C2 '\bid\b' components/webui/client/src/components/SqlInputLength of output: 687
🏁 Script executed:
#!/bin/bash
set -euo pipefail
SQL_INPUT="components/webui/client/src/components/SqlInput/index.tsx"
WHERE_FILE="components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Where.tsx"
echo "== SqlInput file check =="
if [ -f "$SQL_INPUT" ]; then
echo "file: $SQL_INPUT"
nl -ba "$SQL_INPUT" | sed -n '1,240p'
else
echo "NOT FOUND: $SQL_INPUT"
fi
echo
echo "== look for 'id' occurrences inside SqlInput =="
if [ -f "$SQL_INPUT" ]; then
rg -n --hidden --no-ignore-vcs '\bid\b' "$SQL_INPUT" || echo "no 'id' matches in $SQL_INPUT"
fi
echo
echo "== look for props spread / rest forwarding in SqlInput =="
if [ -f "$SQL_INPUT" ]; then
rg -n --hidden --no-ignore-vcs '\.\.\.props|\.\.\.rest|\{[^}]*\.\.\.rest' "$SQL_INPUT" || echo "no obvious props spread patterns in $SQL_INPUT"
rg -n --hidden --no-ignore-vcs 'forwardRef|React\.forwardRef' "$SQL_INPUT" || true
fi
echo
echo "== locate SqlEditorProps type/interface definition in repo =="
rg -n --hidden --no-ignore-vcs 'SqlEditorProps' || echo "SqlEditorProps not found in repo search"
echo
echo "== show Where.tsx referenced in review =="
if [ -f "$WHERE_FILE" ]; then
nl -ba "$WHERE_FILE" | sed -n '1,240p'
else
echo "NOT FOUND: $WHERE_FILE"
fiLength of output: 131
🏁 Script executed:
#!/bin/bash
set -euo pipefail
SQL_INPUT="components/webui/client/src/components/SqlInput/index.tsx"
WHERE_FILE="components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Where.tsx"
echo "== SqlInput file existence =="
if [ -f "$SQL_INPUT" ]; then echo "FOUND: $SQL_INPUT"; else echo "NOT FOUND: $SQL_INPUT"; fi
echo
echo "== SqlInput (first 400 lines) =="
if [ -f "$SQL_INPUT" ]; then sed -n '1,400p' "$SQL_INPUT"; fi
echo
echo "== 'id' occurrences inside SqlInput =="
if [ -f "$SQL_INPUT" ]; then rg -n '\bid\b' "$SQL_INPUT" || echo "no 'id' matches"; fi
echo
echo "== props spread / forwardRef patterns in SqlInput =="
if [ -f "$SQL_INPUT" ]; then
rg -n '\.\.\.props|\.\.\.rest|{\s*\.\.\.rest|forwardRef|React\.forwardRef' "$SQL_INPUT" || true
fi
echo
echo "== Find SqlEditorProps definition in repo =="
rg -n --hidden --no-ignore-vcs 'type SqlEditorProps|interface SqlEditorProps|SqlEditorProps =' || echo "SqlEditorProps not found by simple pattern"
echo
echo "== Underlying editor / focusable element references in SqlInput =="
if [ -f "$SQL_INPUT" ]; then
rg -n 'SqlEditor|Monaco|Ace|CodeMirror|textarea|contentEditable|codemirror|editorRef|getEditor' "$SQL_INPUT" || true
fi
echo
echo "== Where.tsx (context) =="
if [ -f "$WHERE_FILE" ]; then sed -n '1,240p' "$WHERE_FILE"; else echo "NOT FOUND: $WHERE_FILE"; fi
echo
echo "== Locate InputLabel component(s) =="
rg -n --hidden --no-ignore-vcs 'function InputLabel|const InputLabel|export .*InputLabel' components/webui/client/src || true
echo
echo "== Print candidate InputLabel files (first 240 lines) =="
rg -n --hidden --no-ignore-vcs 'function InputLabel|const InputLabel|export .*InputLabel' components/webui/client/src | cut -d: -f1 | sort -u | while read -r f; do
[ -f "$f" ] && { echo "== FILE: $f =="; sed -n '1,240p' "$f"; } || echo "SKIP: $f (not a file)";
doneLength of output: 4610
🏁 Script executed:
#!/bin/bash
set -euo pipefail
SE_FILE="components/webui/client/src/components/SqlEditor/index.tsx"
WHERE_FILE="components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Where.tsx"
INPUT_LABEL="components/webui/client/src/components/InputLabel/index.tsx"
echo "== SqlEditor exists? =="
[ -f "$SE_FILE" ] && echo "FOUND: $SE_FILE" || { echo "NOT FOUND: $SE_FILE"; exit 0; }
echo
echo "== SqlEditor (first 400 lines) =="
sed -n '1,400p' "$SE_FILE"
echo
echo "== 'id' occurrences in SqlEditor =="
rg -n --hidden --no-ignore-vcs '\bid\b|id\s*=' "$SE_FILE" || echo "no 'id' occurrences"
echo
echo "== props spread / forwardRef patterns in SqlEditor =="
rg -n --hidden --no-ignore-vcs '\.\.\.props|{\s*\.\.\.rest|forwardRef|React\.forwardRef' "$SE_FILE" || true
echo
echo "== underlying editor / container references in SqlEditor =="
rg -n --hidden --no-ignore-vcs 'Monaco|monaco|monaco-editor|monacoRef|editorRef|onMount|onEditorMount|textarea|contentEditable|divRef' "$SE_FILE" || true
echo
echo "== Where.tsx (for context) =="
sed -n '1,240p' "$WHERE_FILE" || true
echo
echo "== InputLabel (for context) =="
sed -n '1,240p' "$INPUT_LABEL" || trueLength of output: 5334
A11y: associate label with the SQL input — implement in InputLabel + SqlEditor first
InputLabel currently renders antd Typography.Text (no htmlFor/as props) and SqlInput simply spreads props to SqlEditor → Editor; @monaco-editor/react does not expose a way to set an HTML id on the editor DOM (see issue). (github.com)
- Add htmlFor/as support to InputLabel so it can render a native . — components/webui/client/src/components/InputLabel/index.tsx
- Ensure the editor wrapper receives the id: modify components/webui/client/src/components/SqlEditor/index.tsx to apply the incoming id (or htmlId) to the outer . SqlInput already forwards props to SqlEditor (so no change needed in SqlInput).
After those two changes, apply this Where.tsx update:
- <InputLabel>WHERE</InputLabel>
- <SqlInput />
+ <InputLabel as="label" htmlFor="presto-where">WHERE</InputLabel>
+ <SqlInput id="presto-where" />Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Where.tsx
around lines 11-15, the InputLabel is not associated with the SQL editor because
InputLabel currently renders Typography.Text and SqlEditor does not expose an id
on its DOM; fix by (1) updating
components/webui/client/src/components/InputLabel/index.tsx to accept htmlFor
(or an "as" prop) and render a native <label> when htmlFor is provided (preserve
existing styling and typings), (2) updating
components/webui/client/src/components/SqlEditor/index.tsx to accept an id or
htmlId prop and apply that id to the outer wrapper <div> that contains the
monaco editor so the label can target it, and then (3) change this Where.tsx to
pass a matching id/htmlId to SqlInput (e.g., <InputLabel htmlFor="where-sql">
WHERE </InputLabel> and <SqlInput id="where-sql" />) so the label is
programmatically associated with the editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Trim label whitespace, drop redundant prop, prefer dot-notation.
- Avoid relying on literal spaces for layout; let CSS handle padding.
disabled={false}is redundant.guidedGrid.wherereads cleaner than bracket access.
- <div className={guidedGrid["where"]}>
- <InputLabel> WHERE </InputLabel>
- <SqlInput disabled={false}/>
+ <div className={guidedGrid.where}>
+ <InputLabel>WHERE</InputLabel>
+ <SqlInput />📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div className={guidedGrid["where"]}> | |
| <InputLabel> WHERE </InputLabel> | |
| <SqlInput disabled={false}/> | |
| </div> | |
| <div className={guidedGrid.where}> | |
| <InputLabel>WHERE</InputLabel> | |
| <SqlInput /> | |
| </div> |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Where.tsx
around lines 12 to 15, trim the literal spaces inside the InputLabel, remove the
redundant disabled={false} prop from SqlInput, and use dot-notation for the
className (guidedGrid.where) instead of bracket access; rely on CSS for any
needed padding/spacing rather than literal spaces in the label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Apply a11y linkage for the editor
Use id on InputLabel and aria-labelledby (or aria-label) on SqlInput to make the control discoverable to assistive tech.
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Where.tsx
around lines 12 to 15, the InputLabel and SqlInput are not linked for
accessibility; add a unique id to the InputLabel (e.g. id="where-label" or
generated unique id) and set the SqlInput to reference it via
aria-labelledby="where-label" (or aria-label with same text if label reference
isn’t possible). Ensure the id is stable/unique in this component, update any
props passed to SqlInput to accept aria attributes, and verify the label text
matches the referenced id.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Tidy label and remove redundant prop
Same cleanup as other inputs.
- <InputLabel> WHERE </InputLabel>
- <SqlInput disabled={false}/>
+ <InputLabel>WHERE</InputLabel>
+ <SqlInput/>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <InputLabel> WHERE </InputLabel> | |
| <SqlInput disabled={false}/> | |
| </div> | |
| <InputLabel>WHERE</InputLabel> | |
| <SqlInput/> | |
| </div> |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/Where.tsx
around lines 13-15, tidy the label by removing extra surrounding spaces and
match casing used by other inputs (e.g., change "<InputLabel> WHERE
</InputLabel>" to "<InputLabel>Where</InputLabel>"), and remove the redundant
disabled={false} prop from the SqlInput so it relies on the default enabled
state; keep formatting consistent with the other input components.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,34 @@ | ||||||||||||||||||||||||||||||||
| .gridContainer { | ||||||||||||||||||||||||||||||||
| display: grid; | ||||||||||||||||||||||||||||||||
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | ||||||||||||||||||||||||||||||||
| grid-template-rows: repeat(auto-fit, 30px); | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
| grid-template-rows: repeat(auto-fit, 30px); | |
| grid-auto-rows: 32px; |
so that it matches antd 's default input box height? (even better, we can use some antd var instead of the hardcoded 32px)
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not strictly needed, i think it's better to remove the width limit. since all boxes are stacked together, it should be fine even if all of them show up together on a very long line
| max-width: 1250px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Row sizing bug: use grid-auto-rows instead of template rows.
grid-template-rows: repeat(auto-fit, 30px) depends on container height and won’t size implicit rows. Use grid-auto-rows for consistent 30px rows; consider dense packing.
Apply:
.gridContainer {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
- grid-template-rows: repeat(auto-fit, 30px);
+ grid-auto-rows: 30px;
+ grid-auto-flow: row dense;
max-width: 1250px;
gap: 5px;
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .gridContainer { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| grid-template-rows: repeat(auto-fit, 30px); | |
| max-width: 1250px; | |
| gap: 5px; | |
| } | |
| .gridContainer { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| grid-auto-rows: 30px; | |
| grid-auto-flow: row dense; | |
| max-width: 1250px; | |
| gap: 5px; | |
| } |
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/index.module.css
around lines 1-7, the use of grid-template-rows: repeat(auto-fit, 30px) is
incorrect for implicit row sizing; replace that line with grid-auto-rows: 30px
so each implicit row is consistently 30px high, and optionally add
grid-auto-flow: dense if you want denser packing of items; keep the existing
grid-template-columns, max-width and gap as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix row sizing: use auto rows instead of templated rows
grid-template-rows: repeat(auto-fit, 30px) won’t behave as intended; use grid-auto-rows so rows are created as needed. Also make the grid fill its container and pack items better.
.gridContainer {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
- grid-template-rows: repeat(auto-fit, 30px);
- max-width: 1250px;
+ grid-auto-rows: 32px; /* consider theming to match control height */
+ max-width: 1250px;
+ width: 100%;
gap: 5px;
+ grid-auto-flow: dense;
}Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In
components/webui/client/src/pages/SearchPage/SearchControls/Presto/GuidedControls/index.module.css
around lines 3 to 7, replace the incorrect use of grid-template-rows:
repeat(auto-fit, 30px) with grid-auto-rows: 30px so rows are created as needed,
and ensure the grid fills its container and packs items better by setting the
container to width: 100% (or max-width as needed) and adding alignment
properties such as align-content: start (or center) and justify-items: stretch
to control item packing.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import searchStyles from "../../index.module.css"; | ||
| import QueryStatus from "../../QueryStatus"; | ||
| import SqlInterfaceButton from "../SqlInterfaceButton"; | ||
| import SqlSearchButton from "../SqlSearchButton"; | ||
| import From from "./From"; | ||
| import guidedGrid from "./index.module.css"; | ||
| import Limit from "./Limit"; | ||
| import OrderBy from "./OrderBy"; | ||
| import Select from "./Select"; | ||
| import Where from "./Where"; | ||
|
|
||
|
|
||
| /** | ||
| * Renders controls and status for guided sql. | ||
| * | ||
| * @return | ||
| */ | ||
| const GuidedControls = () => ( | ||
| <div className={searchStyles["searchControlsContainer"]}> | ||
| <div className={guidedGrid["gridContainer"]}> | ||
| <Select/> | ||
| <From/> | ||
| <Where/> | ||
| <OrderBy/> | ||
|
Comment on lines
+21
to
+24
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we remove the left border radius? e.g., |
||
| <Limit/> | ||
| </div> | ||
|
Comment on lines
+20
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Grid + Monaco: verify track sizing to avoid overflow and layout thrash Ensure the grid container and items establish explicit heights (e.g., via grid-auto-rows or minmax) and set min-height: 0 on flex/grid wrappers so Monaco’s automaticLayout works reliably on resize. 🤖 Prompt for AI Agents |
||
| <div className={searchStyles["statusAndButtonsRow"]}> | ||
| <div className={searchStyles["status"]}> | ||
| <QueryStatus/> | ||
| </div> | ||
| <div className={searchStyles["buttons"]}> | ||
| <SqlInterfaceButton/> | ||
| <SqlSearchButton/> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
|
|
||
| export default GuidedControls; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,10 @@ import { | |
| } from "react"; | ||
|
|
||
| import SqlEditor, {SqlEditorType} from "../../../../../components/SqlEditor"; | ||
| import {Nullable} from "../../../../../typings/common"; | ||
|
||
| import useSearchStore from "../../../SearchState/index"; | ||
| import {SEARCH_UI_STATE} from "../../../SearchState/typings"; | ||
| import styles from "./index.module.css"; | ||
| import {Nullable} from "../../../../../typings/common"; | ||
|
|
||
|
|
||
| /** | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Minor: use padding shorthand
Same effect, simpler.
🤖 Prompt for AI Agents