Repository navigation
Conversation
…old#207) An unwrapped title carried a long file name past the viewport: egui's Modal sizes to its content, so the centered panel grew to the name's full width, clipped its own message and pushed Save/Cancel off-screen (reported on Windows, reproduced everywhere). Wrap the title to the dialog width in the save prompt and the password prompt, and pin the title and all three buttons inside a 1365x719 screen in a regression test. Co-authored-by: Mawfyy <mawfy12@gmail.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
… to fit the window (storytold#322) Wrapping the title (storytold#161) kept the prompt narrow, but a long enough name still grew it taller than the window and pushed Save, Cancel and Don't save off-screen. On the web a `?file=` URL names the document, so the name has no length limit. Past 80 characters the name now gives way in the middle ("start…end"), keeping the start and the extension and version suffix; the full name shows on hover. The new test checks the title and buttons stay inside the desktop's minimum window (820×520) for long Latin, Thai and CJK names and a 2000-character one. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
…-on-exit
The slide show's pen becomes a proper notetaking tool set:
- New show_ink module: per-slide stroke store (survives navigation), tool enum
(pointer/pen/highlighter/eraser/laser), palette and width ladder per tool,
midpoint-quadratic stroke smoothing, journal-based undo that also restores
erasures and clears.
- Show bar is always visible: navigation, vector icon buttons for pen,
highlighter, eraser and laser (new laser-pointer icon), 8 color swatches,
width quick-pick dots, Undo/Clear, blank, End. Bar width is measured from
content; narrow windows drop the extras instead of overflowing.
- Laser pointer (Cmd+L): glowing dot with a smooth tapered fading tail; clicks
still advance. Highlighter (Cmd+I), eraser (Cmd+E, ring cursor), Cmd+Z undo,
E clears the slide's ink (undoable).
- Exiting with annotations asks to keep them (modal prompt; Y/Enter keeps,
N/Esc discards); kept ink lands in the document via the new slide.annotate
engine command (validated, capped, undoable; dots promoted to zero-length
segments so they render and export).
- Presenter view mirrors ink. Parity: show pen/highlighter and laser pointer
are now Done. Control channel: ui.key forwards modifiers to the show,
ui.inspect reports ink state, show.end takes {keep} to answer the prompt.
Headless UI regression tests render the show with egui_kittest (widget tree +
pixels): full bar visible, swatches painted, drag draws, prompt buttons painted
and clickable.
…sabled states Nav chevrons, tool icons, swatches and width dots are joined by vector-icon Undo, Clear (new trash icon), Blank screen (new monitor icon, now a toggle) and End (new exit icon); the reading-mode bar gets the same treatment. Buttons show a hover fill, an active frame, grey out when inert (Undo/Clear track the ink journal via the new can_undo) and keep their tooltips even while disabled. Groups are separated by slim dividers; swatches are painted as rounded tiles with hover/selection rings. Headless tests now also assert the disabled state of Undo/Clear follows the ink, and can_undo is unit-tested against the journal.
…e, delete A proper notetaking select tool during the show: lasso icon in the bar (V), click a stroke to select it (Shift toggles/adds), drag a selected stroke to move the whole selection, drag on empty space for a marquee (bbox intersect), Delete removes, Cmd+D duplicates at an offset, Cmd+C/Cmd+V copy/paste across slides via an ink clipboard. Selection shows an accent box with handles; the marquee paints as a tinted rect. Everything is journaled: one move gesture = one undo, duplicate/paste undo as Added, delete restores via the erasure path. Gesture safety, pinned by regression tests: move drags stay anchored to the slide where they began (navigation commits the partial move there, mid-drag or same-frame); undo mid-drag first reverts the in-flight gesture; delete/clear/duplicate/paste close an open gesture before mutating; edit keys are inert on the end screen and mid-drag; sync_slide lives in Show::apply (the one navigation choke point) plus per-key, so no ordering of bar clicks, keys, auto-advance or presenter-window navigation can act on a stale selection. ui.inspect reports the selection count. Adversarial review: 10 findings fixed (1 high: unanchored move corrupted undo), verified fixed in a second pass; its 3 remaining lows (bar-nav key race, same-frame marquee release, can_undo mid-drag) fixed with tests.
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: slide show ink with a pen, highlighter, eraser, laser, keep-on-exit and an ink select tool. The lock gains image, the engine gains a slide.annotate command ("Add Ink Annotations") and imports Shape and ShapeKind into the slide commands. PowerPoint's show-time pens and highlighters, its Keep ink annotations prompt and the Ink Replay are the oracle. Ink annotations kept on exit become shapes of the slide, so they must be one undo step and appear in the saved file as ink (p:contentPart with ink) and not as thousands of shapes; the number of points per stroke needs a bound. It overlaps deckcraft#624 and #636 (laser and recording) by another author, and the ink and laser features should share state. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
Summary
Turns the slide show's pen into a proper notetaking tool set, all reachable from an always-visible icon bar (no collapsed popovers, no text buttons):
show_inkmodule (crates/ui-egui/src/show_ink.rs): per-slide stroke store that survives navigation; tool enum (pointer / select / pen / highlighter / eraser / laser); palette and width ladder per tool; midpoint-quadratic stroke smoothing; journal-based undo covering draws, erasures, clears, moves, duplicates and pastes. Pure and unit-tested (53 tests).icons.rs's code-drawn idiom), 8 color swatches as rounded tiles, 4 width quick-pick dots, slim group dividers. Buttons have hover fills, active frames, disabled greying (Undo/Clear track the ink journal) and tooltips that survive the disabled state. Bar width is measured from content; narrow windows drop the extras instead of overflowing.⌫deletes,⌘Dduplicates,⌘C/⌘Vcopy/paste across slides. Accent bounding box + handles; marquee tint. Gestures are anchored to the slide where they began — navigation mid-drag commits cleanly, undo mid-drag reverts the in-flight gesture.Eclears the slide's ink (undoable),Ccycles color,[/]step the width.slide.annotateengine command (dots promoted to zero-length segments so they render and export).ui.keyforwards modifiers to a running show,ui.inspectreports ink state (inkTool,strokes,selected,askKeep),show.endtakes{keep}to answer the prompt atomically.Parity checklist: Pen and highlighter ink during the show and Laser pointer moved to D (summary regenerated with
cargo xtask parity).Testing
cargo xtask cigreen (fmt, clippy-D warnings, tests, assets, layers, wasm).show_inkunit tests + engine tests forslide.annotate.crates/ui-egui/tests/show_ui.rs, egui_kittest + wgpu, GPU-less-CI guarded): bar contents, disabled-state tracking, drag-draws, prompt buttons, select/move/duplicate/delete through real input, navigation mid-drag.show.end {keep}.Notes for reviewers
Pre-existing, not introduced here, not fixed: after ~3–4 fullscreen show cycles the show can become input-inert (reproduces on the 0.3.0 release build; looks winit/fullscreen-space related);
show.gotodigit entry accumulates stale input; closing the window mid-show drops ink without the keep prompt (quit ≠ end show — arguable); one engine test (clicks_in_flipped_shapes_hit_the_text_where_it_is_drawn) flaked once under full-workspace parallel test load, passes consistently in isolation (font-metric sensitivity — observed on a tree untouched by this PR's crates). Happy to file issues.Update 2026-10-16 — rebased onto current main
Branch rebased onto
main@ 1dc6972 (was based on be14248); conflicts inengine/cmd/slide.rs,ui-egui/{control,lib,show}.rsand docs resolved keeping both sides. After the rebase:cargo xtask ci— fmt, clippy, pdf-deps, assets, layers, wasm all pass.cargo test --workspacehas one failure inreplacefonts_tests::ribbon_button_opens_the_dialog_and_replacesthat reproduces on cleanorigin/mainin a fonts-embedded environment (the Home ribbon is ~130 px wider than the test's 1400 px window, so the "Replace Fonts…" button renders off-screen and the click misses). Pre-existing upstream issue, not caused by this branch.