Skip to content

slides config panel by default to open#9737

Open
Light2Dark wants to merge 1 commit into
mainfrom
sham/config-panel-default-open
Open

slides config panel by default to open#9737
Light2Dark wants to merge 1 commit into
mainfrom
sham/config-panel-default-open

Conversation

@Light2Dark
Copy link
Copy Markdown
Collaborator

@Light2Dark Light2Dark commented Jun 1, 2026

📝 Summary

  • Leaves the panel open by default which aids in documenting the features of slides
  • Adds a localStorage atom so users can persist whether its closed or not
  • Slightly reduce the size of the slide config panel, and fix some outline styles

I'm also okay to remove the local storage persist, just make it true by default. My motivation was if users kept switching between editor and slides, they might want to hide it away for good.

image

📋 Pre-Review Checklist

  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
  • Video or media evidence is provided for any visual changes (optional).

✅ Merge Checklist

  • I have read the contributor guidelines.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Tests have been added for the changes made.

Copilot AI review requested due to automatic review settings June 1, 2026 04:53
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jun 1, 2026 4:53am

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the slides authoring experience by making the slide configuration panel open by default and persisting its open/closed state across sessions, with minor styling tweaks to the slides deck and sidebar sizing.

Changes:

  • Persist slide config panel open/closed state via a jotai atomWithStorage (defaulting to open).
  • Adjust slides config panel width used by the slides layout (300 → 280).
  • Tweak deck focus/outline styling and make configWidth an explicit required prop for the reveal slides component.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
frontend/src/components/slides/slide-form.tsx Adds a localStorage-backed atom to persist the slide config panel open state (default open).
frontend/src/components/slides/reveal-component.tsx Makes configWidth required and adjusts deck focus/outline classes.
frontend/src/components/editor/renderers/slides-layout/slides-layout.tsx Updates configWidth passed to slides component (300 → 280).

Comment thread frontend/src/components/slides/reveal-component.tsx
@Light2Dark Light2Dark added the enhancement New feature or request label Jun 1, 2026
@Light2Dark Light2Dark requested a review from akshayka June 1, 2026 04:58
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Architecture diagram
sequenceDiagram
    participant User
    participant SlideSidebar as SlideSidebar Component
    participant SlideStore as localStorage Store
    participant RevealDeck as RevealSlidesComponent
    
    Note over User,RevealDeck: Slide Config Panel Open/Close Flow
    
    User->>SlideSidebar: Click toggle button
    SlideSidebar->>SlideSlidebar: NEW: Read isConfigOpen from atom
    alt isConfigOpen = false (initially from localStorage)
        SlideSidebar->>SlideStore: NEW: Initialize "marimo:slides:config-open" = true
        SlideStore-->>SlideSidebar: NEW: Return true (default)
        SlideSidebar->>SlideSidebar: Render panel open (width > 36px)
        SlideSidebar->>RevealDeck: Show configWidth=280
    else isConfigOpen = false (user toggled closed)
        SlideSidebar->>SlideStore: NEW: Persist false to localStorage
        SlideStore-->>SlideSidebar: Confirm
        SlideSidebar->>SlideSidebar: Render panel collapsed (width=36px)
        SlideSidebar->>RevealDeck: Hide config panel
    end
    
    Note over SlideSidebar,RevealDeck: CHANGED: Default open state + persistence
    
    alt Slide sidebar expanded
        SlideSidebar->>RevealDeck: CHANGED: configWidth=280 (was 300)
        RevealDeck->>RevealDeck: CHANGED: Apply focus:outline-none classes
        RevealDeck-->>SlideSidebar: Render with smaller panel width
    end
    
    Note over User,SlideStore: Cross-session persistence
    
    User->>SlideSidebar: Navigate away and return
    SlideSidebar->>SlideStore: NEW: Read "marimo:slides:config-open" from localStorage
    alt Previously closed
        SlideStore-->>SlideSidebar: false
        SlideSidebar->>SlideSidebar: Render panel collapsed
    else Previously open (or first visit)
        SlideStore-->>SlideSidebar: true (default)
        SlideSidebar->>SlideSidebar: Render panel open
    end
    
    Note over SlideSidebar: NEW: atomWithStorage + jotaiJsonStorage for persistence
Loading

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants