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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
slides config panel by default to open (#9737)
Shahmir Varqha7ec695fdee71
diff --git a/frontend/src/components/editor/renderers/slides-layout/slides-layout.tsx b/frontend/src/components/editor/renderers/slides-layout/slides-layout.tsxindex 130b00c75f..386b9eb836 100644--- a/frontend/src/components/editor/renderers/slides-layout/slides-layout.tsx+++ b/frontend/src/components/editor/renderers/slides-layout/slides-layout.tsx@@ -55,7 +55,7 @@ export const SlidesLayoutRenderer: React.FC<Props> = ({setLayout={setLayout}activeIndex={resolvedIndex}onSlideChange={handleSlideChange}- configWidth={300}+ configWidth={280}mode={isReading ? "read" : mode}isEditable={!isReading}/>diff --git a/frontend/src/components/slides/reveal-component.tsx b/frontend/src/components/slides/reveal-component.tsxindex 850adfb88b..b82030c4dd 100644--- a/frontend/src/components/slides/reveal-component.tsx+++ b/frontend/src/components/slides/reveal-component.tsx@@ -231,7 +231,7 @@ const RevealSlidesComponent = ({activeIndex,onSlideChange,mode,- configWidth = 300, // px+ configWidth, // pxisEditable = false,}: {cellsWithOutput: RuntimeCell[];@@ -240,7 +240,7 @@ const RevealSlidesComponent = ({activeIndex?: number;onSlideChange?: (index: number) => void;mode: AppMode;- configWidth?: number;+ configWidth: number;isEditable?: boolean;}) => {const containerRef = useRef<HTMLDivElement>(null);@@ -439,7 +439,7 @@ const RevealSlidesComponent = ({<div className="group relative" style={{ width, height }}><DeckdeckRef={deckRef}- className="aspect-video w-full overflow-hidden border rounded bg-background mo-slides-theme prose-slides"+ className="aspect-video w-full overflow-hidden border rounded bg-background mo-slides-theme prose-slides focus:outline-none focus-visible:outline-none"config={revealConfig}onReady={handleDeckReady}onSlideChange={handleSlideChange}diff --git a/frontend/src/components/slides/slide-form.tsx b/frontend/src/components/slides/slide-form.tsxindex 44fac7f178..bdc326de56 100644--- a/frontend/src/components/slides/slide-form.tsx+++ b/frontend/src/components/slides/slide-form.tsx@@ -26,15 +26,23 @@ import type {SlidesLayout,SlideType,} from "../editor/renderers/slides-layout/types";-import { useState } from "react";+import { useAtom } from "jotai";+import { atomWithStorage } from "jotai/utils";import { Tooltip } from "../ui/tooltip";import { Button } from "../ui/button";import { Kbd } from "../ui/kbd";import type { RuntimeCell } from "@/core/cells/types";+import { jotaiJsonStorage } from "@/utils/storage/jotai";export const DEFAULT_SLIDE_TYPE: SlideType = "slide";export const DEFAULT_DECK_TRANSITION: DeckTransition = "slide";const COLLAPSED_CONFIG_WIDTH = 36;+const slideConfigOpenAtom = atomWithStorage<boolean>(+ "marimo:slides:config-open",+ true,+ jotaiJsonStorage,+ { getOnInit: true },+);export interface SlideTypeOption {value: SlideType;@@ -322,7 +330,7 @@ export const SlideSidebar = ({setLayout: (layout: SlidesLayout) => void;activeConfigCell?: RuntimeCell;}) => {- const [isConfigOpen, setIsConfigOpen] = useState(false);+ const [isConfigOpen, setIsConfigOpen] = useAtom(slideConfigOpenAtom);return (<aside@@ -350,7 +358,7 @@ export const SlideSidebar = ({variant="ghost"size="icon"className="h-7 w-7 text-muted-foreground hover:text-foreground"- onClick={() => setIsConfigOpen(!isConfigOpen)}+ onClick={() => setIsConfigOpen((open) => !open)}aria-expanded={isConfigOpen}aria-controls="slide-config-panel">