Skip to content

fix(pptx): speaker notes scale to match slides - #332

Open
stephenswetonic wants to merge 1 commit into
iOfficeAI:mainfrom
stephenswetonic:fix/pptx-preview-notes-width
Open

fix(pptx): speaker notes scale to match slides#332
stephenswetonic wants to merge 1 commit into
iOfficeAI:mainfrom
stephenswetonic:fix/pptx-preview-notes-width

Conversation

@stephenswetonic

@stephenswetonic stephenswetonic commented Aug 21, 2026

Copy link
Copy Markdown

Problem

In the interactive HTML preview, .slide-notes is sized width: var(--slide-design-w) — the slide's design width. When the viewport is narrower than the slide, scaleSlides() scales .slide down by s and resizes .slide-wrapper to designW * s, but the notes box keeps its full design width.

The notes panel therefore renders far wider than the slide above it, and its text is clipped at the viewport edge with no way to scroll to the cut-off portion.

Before
Screenshot 2026-08-20 at 11 27 11 PM

Fix

Apply the same scale factor to the notes box width, in both the scaled and the reset branch of scaleSlides().

How to verify

officecli create notes.pptx
officecli add notes.pptx / --type slide
officecli add notes.pptx "/slide[1]" --type shape \
  --prop text="Quarterly Review" --prop x=4cm --prop y=6cm \
  --prop width=18cm --prop height=3cm
officecli add notes.pptx "/slide[1]" --type notes \
  --prop text="A long speaker note that runs past the right edge of the slide when the notes box is not scaled with it."
officecli watch notes.pptx

Narrow the browser window until the slide visibly shrinks to fit.

  • Before: the Notes block extends well past the right edge of the slide and its text is clipped at the viewport boundary — unreachable by scrolling.
  • After: the Notes block tracks the slide's scaled width and the text wraps inside it.

officecli view notes.pptx html -o preview.html and opening that file works equally well for checking this.

Note that this is only reproducible in the interactive preview: headless/screenshot mode sets .slide-notes { display: none } (PowerPointHandler.HtmlPreview.cs:140), so view screenshot shows no notes either way.

After
Screenshot 2026-08-20 at 11 26 17 PM

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.

1 participant