Repository navigation
Pad animations, add fullscreen and scenarios, and remove Mermaid (Pele) - #1435
Merged
Merged
Conversation
Give the animation stage 16px of padding so a drawing no longer runs into the card's edges. The stage and its slot overlays sit in an inner box, so host code peeks still line up. Add an Expand button to the animation header. It portals the figure into a fullscreen overlay over the canvas (themed, Escape closes, canvas scroll locked), centres the drawing, and keeps a placeholder inline so the document holds its place. Focus moves to Close on open and back to Expand on close. The stage iframe now inherits the page's color-scheme instead of "normal". In dark themes the mismatch made Chromium paint an opaque backdrop behind the frame, which the new padding exposed. Agent-Session: 9433c530-a019-433a-95a7-428a25de521d
whiteboard.mermaid laid out large graphs, but it could not change labels between frames, move chips along edges, or link to code, and it shrank wide graphs until their labels were unreadable. Animations now have two modes: the scene, and the toolkit with raw HTML. The guide sends a large graph to a flow_diagram beside a scene that animates only the part that changes. Drop the stage's Mermaid code and styles, the Pele loader, the pele dependency and its test config, and the two Mermaid tests. A stage that still calls whiteboard.mermaid() gets an error saying to rebuild it as a scene or a flow_diagram, shown inline under the animation. Animations are experimental and unreleased, so few boards have one. Agent-Session: 9433c530-a019-433a-95a7-428a25de521d
main's guard against a stage navigating away keyed on stageKey, so the new iframe that fullscreen mounts was taken for a navigation and never booted. Key it to the iframe element instead, and test going fullscreen and back. Drop main's Mermaid typo test with the rest of the Mermaid tests. Agent-Session: 9433c530-a019-433a-95a7-428a25de521d
…ons test The frame count shows before the stage boots, so on a slow runner the test could step past frame a before its animation ran (CI: "a at 0"). Wait for the stage's ready message instead. Agent-Session: a38a1758-2248-4cad-903d-6e0c59fef9ed
Agent-Session: a38a1758-2248-4cad-903d-6e0c59fef9ed
Agent-Session: a38a1758-2248-4cad-903d-6e0c59fef9ed
Agent-Session: a38a1758-2248-4cad-903d-6e0c59fef9ed
thesiti92
approved these changes
Oct 28, 2026
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.
Five commits, reviewable separately.
Pad animations and let them expand fullscreen
color-schemeinstead ofnormal. In dark themes the mismatch made Chromium paint an opaque backdrop behind the frame, which the new padding made visible.Opening or closing fullscreen reloads the stage at its current frame (the figure moves into a portal), so an in-progress transition restarts.
Remove Mermaid (Pele) from animations
whiteboard.mermaidlaid out large graphs, but labels couldn't change between frames, chips couldn't travel edges, nodes didn't link to code, and wide graphs were shrunk until their labels were unreadable. Animations now have two modes: the scene, and the toolkit with raw HTML. The authoring guide now says to put a large graph in aflow_diagrambeside a scene that animates only the part that changes.This removes the stage's Mermaid code and styles, the Pele loader, the
peledependency and its test config, and the two Mermaid tests.Existing boards: a stage that still calls
whiteboard.mermaid()gets an inline error saying to rebuild it as a scene or aflow_diagram. The rest of the board, and the animation's controls, still render. Animations are experimental (behind a setting) and unreleased, so only recent dev boards can be affected.Merge with main
#1428's guard against a stage navigating away keyed on
stageKey, so the fresh iframe that fullscreen mounts was taken for a navigation and never booted ("The animation left its stage."). The guard now keys on the iframe element, which still catches a reload in the same frame. A new test goes fullscreen and back and checks the stage boots each time; it fails with the old guard.Add scenarios to animations, with a labelled picker
Alternate paths used to be buttons that each agent drew inside the stage, and readers didn't recognise them as scenarios.
scenarios: 2 to 8 entries of{ key, label, frames }, each an ordered path through the declared frames. The server rejects duplicate keys, a frame listed twice, and frames the animation doesn't declare.SegmentedControl. The stage starts on the first scenario (or the one already picked, across fullscreen), and picking another sends the stage its frames as the active path.whiteboard.setSequencestill works for a branch the drawing itself decides. When its path matches a scenario, the picker shows that scenario.scenarios, and its checklist says alternate paths are scenarios, not buttons drawn in the stage.Fold wide scenes into fewer columns and open columns for link labels
Found while testing a complex board (four-column scene, code peeks, three scenarios) in Desktop.
Keep the selected block's hint on it as the block resizes
In the board editor, the hint on a selected block was measured once. An animation grows as its frames add code peeks, so the hint stayed where the block used to end, inside a peek. It now follows the card's size.
Testing
blocks.browser.test.tsx(9 pass) andanimation-authoring/instructionstests (15 pass).pnpm lint,pnpm format, canvas typecheck.whiteboard.mermaid, or reduced motion (nothing new animates).