[Query Copilot] Pin panel footer to the bottom, remove gap between panel and console (#1511)

* Move footer when save button is enabled to the bottom, remove gap between notification console and right panel

* Change the way panel height is calculated

* Remove unnecessary operator

* Change condition

* Fix snapshot

* Update panel height after animation ends and use different css for showing save button to the bottom of the page

* Fix ts compile
This commit is contained in:
v-darkora
2023-07-07 09:09:15 +02:00
committed by GitHub
parent 3bef1ed136
commit 0eaa5d004b
7 changed files with 55 additions and 17 deletions

View File

@@ -139,10 +139,11 @@ export const SaveQueryPane: FunctionComponent<SaveQueryPaneProps> = ({
onSubmit: () => {
isSaveQueryEnabled() ? submit() : setupQueries();
},
footerStyle: isSaveQueryEnabled() ? { flexGrow: 0 } : {},
};
return (
<RightPaneForm {...props}>
<div className="panelFormWrapper">
<div className="panelFormWrapper" style={{ flexGrow: 1 }}>
<div className="panelMainContent">
{!isSaveQueryEnabled() ? (
<Text variant="small">{setupSaveQueriesText}</Text>

View File

@@ -2,6 +2,7 @@
exports[`Save Query Pane should render Default properly 1`] = `
<RightPaneForm
footerStyle={Object {}}
formError=""
isExecuting={false}
onSubmit={[Function]}
@@ -9,6 +10,11 @@ exports[`Save Query Pane should render Default properly 1`] = `
>
<div
className="panelFormWrapper"
style={
Object {
"flexGrow": 1,
}
}
>
<div
className="panelMainContent"