fix playwright slides test, and fix sizing#9642
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
No issues found across 5 files
Architecture diagram
sequenceDiagram
participant Playwright as Playwright Test
participant Browser as Browser Page
participant Reveal as Reveal.js Deck
participant Slides as SlidesLayout
participant Minimap as Slides Minimap
Note over Playwright,Minimap: Slide Rendering & Keyboard Navigation Flow
Playwright->>Browser: Navigate to slides page
Browser->>Reveal: Initialize slide deck
Reveal->>Reveal: Set tabIndex=-1 on .reveal wrapper
Reveal->>Reveal: Focus .reveal wrapper (preventScroll: true)
Reveal-->>Browser: Deck ready
Browser->>Slides: Render slides layout
Slides->>Slides: Apply flex-1 class for vertical stretching
Slides->>Minimap: Pass cells with output
Minimap-->>Slides: Render minimap
Slides-->>Browser: Rendered slides container
Playwright->>Browser: Query .slides > section elements
Browser->>Reveal: Get slide sections
Reveal-->>Browser: Return sections
Browser-->>Playwright: 2 slides found
Playwright->>Browser: Assert nth(0) has class .present
Playwright->>Browser: Click slides container
Browser->>Browser: Set document.activeElement to .reveal wrapper
Browser-->>Playwright: Focus confirmed via polling
Playwright->>Browser: Press ArrowRight key
Browser->>Reveal: Dispatch keydown event
alt document.activeElement is not input/textarea
Reveal->>Reveal: Advance to next slide
Reveal-->>Browser: nth(1) slide has class .present
else document.activeElement is input/textarea (e.g., speaker notes)
Reveal->>Reveal: Ignore keydown (no navigation)
end
Browser-->>Playwright: Assert nth(1) has class .present
Playwright->>Browser: Press ArrowLeft key
Browser->>Reveal: Dispatch keydown event
alt document.activeElement is .reveal wrapper
Reveal->>Reveal: Go to previous slide
Reveal-->>Browser: nth(0) slide has class .present
end
Browser-->>Playwright: Assert nth(0) has class .present
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the slides Playwright E2E test by making slide selection and keyboard navigation more reliable, and adjusts the editor slides layout so the slide area properly stretches even for notebooks with very few cells.
Changes:
- Ensure Reveal’s deck wrapper receives focus on initialization so arrow-key navigation works without requiring a click (even when focus was previously restored to an input like speaker notes).
- Fix slides layout sizing by letting the editor slides container grow to fill available space.
- Update the Playwright slides test to identify slides positionally and verify focus/navigation behavior more robustly.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| frontend/src/components/slides/reveal-component.tsx | Forces focus onto the Reveal wrapper on deck ready to make keyboard navigation consistent. |
| frontend/src/components/editor/renderers/slides-layout/slides-layout.tsx | Adds flex-1 to ensure the slides layout stretches to fill the available vertical space. |
| frontend/e2e-tests/slides.spec.ts | Updates slide selection logic and adds a focus assertion to reduce flakiness in keyboard navigation. |
mscolnick
approved these changes
May 21, 2026
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.7-dev73 |
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
📋 Pre-Review Checklist
✅ Merge Checklist