-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add speaker notes for slides #9533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1bebfad
add speaker notes feat
Light2Dark d5ec3b8
resize speaker window, remove filename in kiosk mode
Light2Dark c5bbc33
address comments
Light2Dark 18bd7f8
only hide filename if chrome is hidden
Light2Dark 7c5702d
Update frontend/src/components/slides/slide-notes-editor.tsx
Light2Dark 46c37db
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d6cf80e
improve types
Light2Dark 72cfcb4
make the default panel size bigger
Light2Dark 94f7fdf
add type guard
Light2Dark cd30cbd
add looseObject schema
Light2Dark a884ca3
better defaults, fix playwright selector
Light2Dark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
70 changes: 39 additions & 31 deletions
70
frontend/src/components/editor/renderers/slides-layout/types.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,49 @@ | ||
| /* Copyright 2026 Marimo. All rights reserved. */ | ||
| /* oxlint-disable typescript/no-empty-object-type */ | ||
|
|
||
| import { z } from "zod"; | ||
| import type { CellId } from "@/core/cells/ids"; | ||
|
|
||
| const SlideTypeSchema = z.enum(["slide", "sub-slide", "fragment", "skip"]); | ||
| export type SlideType = z.infer<typeof SlideTypeSchema>; | ||
|
|
||
| const SlideConfigSchema = z.object({ | ||
|
cubic-dev-ai[bot] marked this conversation as resolved.
Outdated
|
||
| type: SlideTypeSchema.optional(), | ||
| speakerNotes: z.string().optional(), | ||
| }); | ||
| export type SlideConfig = z.infer<typeof SlideConfigSchema>; | ||
|
|
||
| const DeckTransitionSchema = z.enum([ | ||
| "none", | ||
| "fade", | ||
| "slide", | ||
| "convex", | ||
| "concave", | ||
| "zoom", | ||
| ]); | ||
| export type DeckTransition = z.infer<typeof DeckTransitionSchema>; | ||
|
|
||
| const DeckConfigSchema = z.object({ | ||
| transition: DeckTransitionSchema.optional(), | ||
| }); | ||
| export type DeckConfig = z.infer<typeof DeckConfigSchema>; | ||
|
|
||
| /** | ||
| * The serialized form of a slides layout. | ||
| * This must be backwards-compatible as it is stored on the user's disk. | ||
| * Schema for the serialized form of a slides layout. | ||
| * | ||
| * This must be backwards-compatible as it is stored on the user's disk β | ||
| * fields are optional so files saved before they existed (e.g. the bare `{}` | ||
| * emitted by earlier marimo versions) still deserialize cleanly. | ||
| */ | ||
| // oxlint-disable-next-line typescript/consistent-type-definitions | ||
| export type SerializedSlidesLayout = { | ||
| // Both fields are optional so files saved before these existed (e.g. the | ||
| // bare `{}` emitted by earlier marimo versions) still deserialize cleanly. | ||
| deck?: DeckConfig; | ||
| cells?: SlideConfig[]; | ||
| }; | ||
| export const SlidesLayoutSchema = z.object({ | ||
| cells: z.array(SlideConfigSchema).optional(), | ||
| deck: DeckConfigSchema.optional(), | ||
| }); | ||
| export type SerializedSlidesLayout = z.infer<typeof SlidesLayoutSchema>; | ||
|
|
||
| export interface SlidesLayout extends Omit< | ||
| SerializedSlidesLayout, | ||
| "cells" | "deck" | ||
| > { | ||
| // We map the cells to their IDs so that we can track them as they move around. | ||
| /** | ||
| * Runtime form of a slides layout. | ||
| */ | ||
| export interface SlidesLayout { | ||
| cells: Map<CellId, SlideConfig>; | ||
| deck: DeckConfig; | ||
| } | ||
|
|
||
| export type SlideType = "slide" | "sub-slide" | "fragment" | "skip"; | ||
| export interface SlideConfig { | ||
| type?: SlideType; | ||
| } | ||
|
|
||
| export type DeckTransition = | ||
| | "none" | ||
| | "fade" | ||
| | "slide" | ||
| | "convex" | ||
| | "concave" | ||
| | "zoom"; | ||
| export interface DeckConfig { | ||
| transition?: DeckTransition; | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.