oficina / slides Public

Editor: the phone view is a phone

In phone view the editable stage, and in Both the read-only preview,
is drawn as a phone (spec §6.1): a 390×844 screen with a 28px corner
and the slide's paper shadow, on the viewer's page ground, the slide
placed where the viewer places it on a 390×844 page, scrolling inside
itself. CSS zoom scales it by --slides-phone-scale, which
fixtures/phone-frame.mjs keeps at the stages' height over 844 (never
above 1), so the phone is as tall as the stages allow.

The editable stage gets a [slides-stage-frame] wrapper (display:
contents outside phone view) that is its screen; the preview's slide
goes in [slides-phone-screen]. The canvas overlay and presence marks
are zoomed back to 1 inside the frame so their screen-pixel placement
holds. The HTML both stages hold is unchanged, checked against a
capture from the commit before (testdata/phone-stage-html.json).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 0ad5f23a0bf7e4b4eea34ce378652c8e82da0e50 parent 94ec57a
9 files changed, +633 −49
  • fixtures/editor-entry.js +9 −1
  • fixtures/phone-frame.mjs +55 −0
  • fixtures/phone-frame.test.mjs +66 −0
  • internal/slides/credits/assets.json +1 −1
  • internal/slides/static/{editor.c3fbe7c9ae1c7c02.js => editor.c4fc611fcaafb637.js} +15 −15
  • internal/slides/static/editor.css +102 −17
  • internal/slides/templates/editor.html +11 −5
  • internal/slidestest/browser_editor_tidy_test.go +368 −10
  • internal/slidestest/testdata/phone-stage-html.json +6 −0
fixtures/editor-entry.js

Loading diff…

fixtures/phone-frame.mjs

Loading diff…

fixtures/phone-frame.test.mjs

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/static/{editor.c3fbe7c9ae1c7c02.js => editor.c4fc611fcaafb637.js}

Loading diff…

internal/slides/static/editor.css

Loading diff…

internal/slides/templates/editor.html

Loading diff…

internal/slidestest/browser_editor_tidy_test.go

Loading diff…

internal/slidestest/testdata/phone-stage-html.json

Loading diff…