Skip to content

Commit

Permalink
Move control of spacing into the datasource QueryEditor (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot authored Jul 13, 2022
1 parent 39c78c1 commit e6c2dc4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,6 @@ function QueryNodeEditorDialog<Q, P>({
flex: 1,
minWidth: 0,
overflow: 'auto',
gap: 2,
px: 3,
py: 1,
}}
>
<ConnectionContextProvider value={queryEditorContext}>
Expand All @@ -355,9 +352,9 @@ function QueryNodeEditorDialog<Q, P>({
/>
</ConnectionContextProvider>

<Grid container direction="row" spacing={1}>
{/* TODO: move transform inside of the dataSource.QueryEditor and remove the conditional */}
{dataSourceId === 'function' ? null : (
{/* TODO: move transform inside of the dataSource.QueryEditor and remove the conditional */}
{dataSourceId === 'function' ? null : (
<Grid container direction="row" spacing={1} sx={{ px: 3, pb: 1, mt: 2 }}>
<React.Fragment>
<Divider />
<Grid item xs={6}>
Expand All @@ -384,9 +381,10 @@ function QueryNodeEditorDialog<Q, P>({
</Stack>
</Grid>
</React.Fragment>
)}
</Grid>
</Grid>
)}
</Stack>

{/* TODO: move preview inside of the dataSource.QueryEditor and remove the conditional */}
{dataSourceId === 'function' ? null : (
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function QueryEditor({
);

return (
<Stack direction="column" gap={2}>
<Stack direction="column" gap={2} sx={{ px: 3, pt: 1 }}>
<Autocomplete
fullWidth
value={fetchedFile.data ?? null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function QueryEditor({
});

return (
<Stack gap={2}>
<Stack gap={2} sx={{ px: 3, pt: 1 }}>
<Typography>Parameters</Typography>
<ParametersEditor
value={params}
Expand Down

0 comments on commit e6c2dc4

Please sign in to comment.