Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Fill available space in the dashboard new-question query builder (#77270)

Sébastiene29d97eb9e96
diff --git a/frontend/src/embedding-sdk-bundle/components/public/dashboard/SdkDashboard.tsx b/frontend/src/embedding-sdk-bundle/components/public/dashboard/SdkDashboard.tsx
index 96915016648..9f753e1cb9a 100644
--- a/frontend/src/embedding-sdk-bundle/components/public/dashboard/SdkDashboard.tsx
+++ b/frontend/src/embedding-sdk-bundle/components/public/dashboard/SdkDashboard.tsx
@@ -648,18 +648,24 @@ const SdkDashboardInner = ({
/>
</MaybeStyledWrapper>
) : (
- <DashboardQueryBuilder
- onCreate={(question) => {
- setNewDashboardQuestionId(question.id);
- sdkNavigation?.pop(); // onPop handles setRenderMode("dashboard")
- dashboardContextProviderRef.current?.refetchDashboard();
- }}
- onNavigateBack={() => {
- sdkNavigation?.pop(); // onPop handles setRenderMode("dashboard")
- }}
- dataPickerProps={dataPickerProps}
- onVisualizationChange={onVisualizationChange}
- />
+ <MaybeStyledWrapper
+ skip={skipStyledWrapper}
+ className={className}
+ style={style}
+ >
+ <DashboardQueryBuilder
+ onCreate={(question) => {
+ setNewDashboardQuestionId(question.id);
+ sdkNavigation?.pop(); // onPop handles setRenderMode("dashboard")
+ dashboardContextProviderRef.current?.refetchDashboard();
+ }}
+ onNavigateBack={() => {
+ sdkNavigation?.pop(); // onPop handles setRenderMode("dashboard")
+ }}
+ dataPickerProps={dataPickerProps}
+ onVisualizationChange={onVisualizationChange}
+ />
+ </MaybeStyledWrapper>
),
)
.exhaustive()}
@@ -748,8 +754,9 @@ function DashboardQueryBuilder({
}}
entityTypes={dataPickerProps?.entityTypes}
withChartTypeSelector
- // The default value is 600px and it cuts off the "Visualize" button.
- height="700px"
+ // Fill the available space so the query builder matches the dashboard's
+ // sizing instead of a fixed height that leaves whitespace / scrolls.
+ height="100%"
onVisualizationChange={onVisualizationChange}
/>
);