slides config panel by default to open#9737
Open
Light2Dark wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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
jotaiatomWithStorage(defaulting to open). - Adjust slides config panel width used by the slides layout (300 → 280).
- Tweak deck focus/outline styling and make
configWidthan 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). |
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
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.
📋 Pre-Review Checklist
✅ Merge Checklist