Repository navigation
Overlay Studio: pick many layers, zoom, lock, restack, and a smoother editor - #82
Merged
Merged
Conversation
…acks The Overlay Studio moves out of index.html into web/studio.js, served on its own like integrations.js. Where layers sit (moves, resizes, snapping, lining up, restacking) is pure maths in StudioGeometry, with its own tests. Controls name an action (data-st) instead of inline onclick code, and only listed actions run. Editing: - pick several layers: Shift or Ctrl click, a band on empty canvas, Ctrl+A; drag, nudge, line up, spread, copy, paste and delete them together, with a panel for what they share; - eight resize handles that keep the opposite side, whatever the anchor (bottom-anchored alert layers grew away from the pointer), always drawn above other layers; a font-sized layer's corner follows the pointer, and fitted words widen with it; - snapping to the canvas, the safe area and other layers (Alt: off), Shift keeps a drag straight; - zoom (Ctrl+scroll, Ctrl+=/-/0, a corner control) and pan (Space or the middle button, or scroll once zoomed); - lock layers, so the canvas picks what is under them; - restack by dragging rows in Layers or Ctrl+Up/Down (Shift: to the end), a right-click menu, hover linking Layers and the canvas, a double-click to type a layer's words, and a shortcuts card on ?; - a third sample alert with a long name and message. Fixed: - a move or resize no longer reloads the preview, replays every animation or jumps back and glides; - boxes follow the canvas when it lays itself out again (a font arriving, the sample alert's words); - an undo right after an edit takes that edit back; - half-typed numbers and colours wait instead of moving or painting the layer; the overlay's name is an edit (undo, the unsaved warning); - Esc steps back one thing at a time instead of closing the Studio; - changing the anchor keeps the layer where it is; Ctrl+A skips layers hidden in the edited state; Ctrl+C with words selected copies them; - layers pasted from another page take that overlay's rules. scripts/e2e.sh: scenarios E and F no longer stop on an unset $ff when an earlier step failed.
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.
Users said that when editing an alert or an overlay you couldn't select and move several elements at once, and that the editor felt buggy. This rebuilds the editor's interaction layer and moves it into its own file,
web/studio.js. The overlay format is unchanged, so existing overlays and designs open as before. No version bump; this ships as a build update.What changes for streamers
Several layers at once
Placing
Zoom and pan
Layers
?for a shortcuts card. It's also in the ⋯ menu and the footer.Fixes
Code
index.htmlintoweb/studio.js, served gzipped likeintegrations.js(build.rs,src/web.rs).index.htmlloses about 1,550 lines.StudioGeometry, covered byweb/tests/studio.test.mjs.data-st) instead of buildingonclickstrings, and only actions inACTIONScan run. A test checks that every name exists.scripts/e2e.sh: scenarios E and F no longer crash on an unset$ffwhen an earlier step failed.Testing
node scripts/check.mjs: format, lint, 940 Rust tests and 95 page tests pass.