Skip to content

New slides end with self.wait(0.1) so Play can build them - #6

Merged
josephrich98 merged 1 commit into
mainfrom
fix-new-slide-wait
Oct 23, 2026
Merged

josephrich98 merged 1 commit into
mainfrom
fix-new-slide-wait

Conversation

@lakigigar

Copy link
Copy Markdown
Contributor

Problem

Play fails with "building slide N failed" on any slide made with New Slide that has no animation. The build log shows manim-slides refusing it:

ValidationError: 1 validation error for PreSlideConfig
  Value error, You have to play at least one animation (e.g., 'self.wait()') before pausing.

A new slide's construct() ended in pass. Once text was typed into its placeholders, pass was removed and only self.add(...) calls were left, with no animation.

Fix

_layout_body now ends a new slide with self.wait(0.1) # manimble new slide instead of pass. New builds already do the same thing (new_build adds self.wait(0.1) # manimble new build for the same reason). Like pass, the statement keeps the # manimble placeholder comments inside the class. Unlike pass, it is never removed. Slides made before this change keep their pass handling, and the comment there now says so.

Testing

  • engine/manimble/core.py compiles.
  • A slide written the way the new template writes it (placeholder comments followed by self.wait(0.1)) builds with manim_slides render: "Played 1 animations", and slides/NewSlide1.json is written.
  • A real deck slide that had failed (only self.add(...)) builds once self.wait(0.1) is appended.
  • Not tested: the New Slide → type text → Play flow in the app itself. tests/ has no coverage of new slides.

🤖 Generated with Claude Code

A slide made with New Slide ended its construct() with `pass`. Once text
was typed into its placeholders, `pass` was removed, leaving a slide with
no animation, which manim-slides refuses to build ("You have to play at
least one animation ... before pausing"), so Play failed on it.

New slides now end with `self.wait(0.1)  # manimble new slide`, as new
builds already do. It keeps the placeholder comments inside the class,
as `pass` did, and is never removed. Slides made earlier keep their
`pass` handling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@josephrich98
josephrich98 merged commit 2f8a389 into main Oct 23, 2026
2 checks passed
@josephrich98
josephrich98 deleted the fix-new-slide-wait branch October 23, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants