Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: responsive Vega chart sizing with media queries (#3637)

Myles Scolnickfd70d24fcc8a
diff --git a/frontend/src/core/network/types.ts b/frontend/src/core/network/types.ts
index a069150373..4d25a392cc 100644
--- a/frontend/src/core/network/types.ts
+++ b/frontend/src/core/network/types.ts
@@ -17,7 +17,6 @@ export type CellConfig = schemas["CellConfig"];
*/
export type RuntimeState = schemas["RuntimeState"];
export type CodeCompletionRequest = schemas["CodeCompletionRequest"];
-export type CreationRequest = schemas["CreationRequest"];
export type DeleteCellRequest = schemas["DeleteCellRequest"];
export type ExecuteMultipleRequest = schemas["ExecuteMultipleRequest"];
export type ExecutionRequest = schemas["ExecutionRequest"];
diff --git a/frontend/src/plugins/impl/vega/vega.css b/frontend/src/plugins/impl/vega/vega.css
index cfda9be013..6c3178de08 100644
--- a/frontend/src/plugins/impl/vega/vega.css
+++ b/frontend/src/plugins/impl/vega/vega.css
@@ -1,7 +1,10 @@
.vega-embed {
width: 100%;
- min-width: 300px;
flex: 1;
+
+ @media (min-width: 500px) {
+ min-width: 300px;
+ }
}
.vega-embed > .chart-wrapper {
@@ -12,7 +15,10 @@
div:has(> marimo-ui-element > marimo-vega) {
display: block !important;
flex: 1;
- min-width: 450px;
+
+ @media (min-width: 500px) {
+ min-width: 350px;
+ }
}
.vega-embed canvas {