oficina / slides Public

Slides editor: a new slide can be typed into, made from a layout, under an I2 header

Paul (2026-11-11): "I should be able to actually add and edit Slides via
the UI", and "level up its UI based on the recent Docs UI stuff".

Adding and editing:
- An empty text block on the stage shows a placeholder ("Add a title",
  "Add text", …; render.Options.Placeholders, data-placeholder). New
  slides used to open as a blank rectangle: their heading was there, one
  empty line, and invisible. Pure CSS on the markup the server and
  ProseMirror share, so nothing moves when the editor binds.
- New slide makes a layout (fixtures/slide-layouts.mjs): Title, Title and
  text, Title and list, Two columns, Section, Picture, Quote, Blank — a
  template plus its empty blocks, through the ordinary ops. Plain New
  slide follows the current slide's layout. The op vocabulary is
  unchanged.
- The strip ends in a New slide button with a layout picker (pictures,
  in a top-layer popover); the strip numbers its slides; Delete or
  Backspace on a slide asks to delete it.

The I2 header, after Docs' editor (design/richer-ui + the I2 look): the
32px icon, the deck's title (editable, the inspector's Title field) over
File / Edit / Insert / Slide / View / Help menus (estilo's menubar), and
the controls as one set: save line, undo/redo pill, Inspector toggle,
Share, Present, switcher, account. Help has a keyboard shortcuts dialog.
The editor sits on a desk; the slide is paper on it; notes are a card
under it; the inspector is a floating card, compact, and can be hidden.

layout.html gains a "bar" block so a page can draw its own header from
estilo's parts. Browser tests now open the Edit and Slide menus by name
([slides-menu="edit"|"slide"]); a font wait makes the menu bar, the
history pill and the title inert.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev b1062442969879e8c370c080a017993f0795a984 parent af4f47e
17 files changed, +1,233 −175
  • fixtures/commands.mjs +10 −7
  • fixtures/editor-entry.js +6 −5
  • fixtures/editor-fonts.mjs +3 −1
  • fixtures/head.mjs +127 −0
  • fixtures/slide-layouts.mjs +63 −0
  • internal/slides/credits/assets.json +1 −1
  • internal/slides/editor.go +82 −9
  • internal/slides/icons/icons.go +4 −0
  • internal/slides/locales/en.toml +52 −0
  • internal/slides/render/render.go +12 −1
  • internal/slides/static/{editor.e8e32ceaf50be366.js => editor.7a9018aeca5c28ef.js} +15 −15
  • internal/slides/static/editor.css +648 −86
  • internal/slides/templates/editor.html +191 −37
  • internal/slides/templates/layout.html +5 −1
  • internal/slidestest/browser_test.go +8 −8
  • internal/slidestest/editor_test.go +4 −2
  • internal/slidestest/fonts_browser_test.go +2 −2
fixtures/commands.mjs

Loading diff…

fixtures/editor-entry.js

Loading diff…

fixtures/editor-fonts.mjs

Loading diff…

fixtures/head.mjs

Loading diff…

fixtures/slide-layouts.mjs

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/editor.go

Loading diff…

internal/slides/icons/icons.go

Loading diff…

internal/slides/locales/en.toml

Loading diff…

internal/slides/render/render.go

Loading diff…

internal/slides/static/{editor.e8e32ceaf50be366.js => editor.7a9018aeca5c28ef.js}

Loading diff…

internal/slides/static/editor.css

Loading diff…

internal/slides/templates/editor.html

Loading diff…

internal/slides/templates/layout.html

Loading diff…

internal/slidestest/browser_test.go

Loading diff…

internal/slidestest/editor_test.go

Loading diff…

internal/slidestest/fonts_browser_test.go

Loading diff…