Mass guide editor changes #18

Merged
Tyler merged 25 commits from guide_editor_changes into main 2026-06-15 15:37:48 +00:00
Owner

Improvement Area

  • Documentation
  • Tests
  • Git / workflow
  • Other

Issue

  • Closes #

Summary

A batch of guide-editor improvements: a live focused-view crop/zoom preview, annotation panel and label cleanup, a richer description editor (links, quotes, newline-preserving export), substep management, snapshot/share-as-file changes, GFM-style alert callouts with PDF export fixes, export ordering fixes, a new global undo/redo that also covers step deletion, a simplified capture-session UI, and a CI trigger restriction.

Changes

  • Focused view: live crop/zoom preview canvas in the "Focused" controls that mirrors core/raster.js applyFocusedView, updating in real time as Zoom/Pan X/Pan Y sliders move; linearized the pan range and flipped Pan Y to feel natural.
  • Annotations: Backspace deletes the selected annotation; the settings panel now shows only the fields relevant to the selected annotation type and drops the redundant delete button; the Type dropdown, Annotations list, and toolbar use proper display labels ("Rectangle", "Highlight", etc.) instead of abbreviations.
  • Style-copy buttons: clarified their scope with a heading and more descriptive tooltips.
  • Sharing & snapshots: replaced the disabled "Local guide" label with a working "Share as file" action; removed the guide-link panel button since Save now keeps linked archives in sync; manual snapshots now prompt for a name before saving.
  • Substeps: added a "Make substep of…" option to the step context menu, with a hover submenu listing all steps as targets.
  • Description editor: insert markdown-style [text](url) links from the Link toolbar button (inline placeholder, no prompt), preserve newlines on export, toggle Quote formatting, and highlight active toolbar buttons.
  • Exports: switched Note/Tip/Warning/Important callouts to GitHub-Flavored Markdown alert syntax with matching quote/callout styling; fixed PDF rendering of rich text, links, special characters, and word spacing; fixed export block ordering plus stale per-step UI and cross-step block loss.
  • Global undo: the canvas undo/redo stack now also tracks step deletion (single or multi-select). Undo restores the deleted step(s) with their original id, content, and images at their original position (including re-parenting any substeps); redo deletes them again. Backed by a new restoreStep store method and step:restore IPC call. Added Ctrl+Z / Ctrl+Shift+Z to the keyboard shortcuts help.
  • Capture session UI: removed "Finish capture session" from the editor's capture menu; the top-right capture bar now toggles directly between "Start recording" and "Stop recording".
  • CI: the test workflow now runs only on pushes to main and on manual workflow_dispatch, instead of on every PR push.

Testing

  • bash tests/run_test.sh
  • Manual verification completed
  • Tests not run

Testing Notes

  • bash tests/run_test.sh passes end-to-end: click-capture selftest, repo structure, startup smoke, full unit suite (155/155), build/release workflow, and sample-artifacts workflow all OK.
  • Manually exercised the running app: deleting a step (single and multi-select) and pressing Ctrl+Z/Ctrl+Shift+Z correctly restores/re-deletes the step(s), including images and substep re-parenting, in the right order.
  • Manually confirmed the capture menu no longer shows "Finish capture session" and the top-right capture bar toggles "Start recording" / "Stop recording".

Screenshots or Recordings

N/A

Deployment / Rollout Notes

  • No special rollout steps
  • Documentation only
  • Other

Notes

None.

Checklist

  • Scope is limited to the selected area above.
  • Related docs or comments were updated if needed.
  • I ran bash tests/run_test.sh.
  • The PR references a issue number.
  • Any follow-up work is tracked in TODO.md or an issue.
## Improvement Area - [ ] Documentation - [x] Tests - [x] Git / workflow - [x] Other ## Issue - Closes # <!-- No tracked issue; this PR bundles a series of guide-editor improvements developed together on `guide_editor_changes`. --> ## Summary A batch of guide-editor improvements: a live focused-view crop/zoom preview, annotation panel and label cleanup, a richer description editor (links, quotes, newline-preserving export), substep management, snapshot/share-as-file changes, GFM-style alert callouts with PDF export fixes, export ordering fixes, a new global undo/redo that also covers step deletion, a simplified capture-session UI, and a CI trigger restriction. ## Changes - **Focused view**: live crop/zoom preview canvas in the "Focused" controls that mirrors `core/raster.js` `applyFocusedView`, updating in real time as Zoom/Pan X/Pan Y sliders move; linearized the pan range and flipped Pan Y to feel natural. - **Annotations**: Backspace deletes the selected annotation; the settings panel now shows only the fields relevant to the selected annotation type and drops the redundant delete button; the Type dropdown, Annotations list, and toolbar use proper display labels ("Rectangle", "Highlight", etc.) instead of abbreviations. - **Style-copy buttons**: clarified their scope with a heading and more descriptive tooltips. - **Sharing & snapshots**: replaced the disabled "Local guide" label with a working "Share as file" action; removed the guide-link panel button since Save now keeps linked archives in sync; manual snapshots now prompt for a name before saving. - **Substeps**: added a "Make substep of…" option to the step context menu, with a hover submenu listing all steps as targets. - **Description editor**: insert markdown-style `[text](url)` links from the Link toolbar button (inline placeholder, no prompt), preserve newlines on export, toggle Quote formatting, and highlight active toolbar buttons. - **Exports**: switched Note/Tip/Warning/Important callouts to GitHub-Flavored Markdown alert syntax with matching quote/callout styling; fixed PDF rendering of rich text, links, special characters, and word spacing; fixed export block ordering plus stale per-step UI and cross-step block loss. - **Global undo**: the canvas undo/redo stack now also tracks step deletion (single or multi-select). Undo restores the deleted step(s) with their original id, content, and images at their original position (including re-parenting any substeps); redo deletes them again. Backed by a new `restoreStep` store method and `step:restore` IPC call. Added Ctrl+Z / Ctrl+Shift+Z to the keyboard shortcuts help. - **Capture session UI**: removed "Finish capture session" from the editor's capture menu; the top-right capture bar now toggles directly between "Start recording" and "Stop recording". - **CI**: the test workflow now runs only on pushes to `main` and on manual `workflow_dispatch`, instead of on every PR push. ## Testing - [x] `bash tests/run_test.sh` - [x] Manual verification completed - [ ] Tests not run ### Testing Notes - `bash tests/run_test.sh` passes end-to-end: click-capture selftest, repo structure, startup smoke, full unit suite (155/155), build/release workflow, and sample-artifacts workflow all OK. - Manually exercised the running app: deleting a step (single and multi-select) and pressing Ctrl+Z/Ctrl+Shift+Z correctly restores/re-deletes the step(s), including images and substep re-parenting, in the right order. - Manually confirmed the capture menu no longer shows "Finish capture session" and the top-right capture bar toggles "Start recording" / "Stop recording". ## Screenshots or Recordings N/A ## Deployment / Rollout Notes - [x] No special rollout steps - [ ] Documentation only - [ ] Other ### Notes None. ## Checklist - [x] Scope is limited to the selected area above. - [x] Related docs or comments were updated if needed. - [x] I ran `bash tests/run_test.sh`. - [ ] The PR references a issue number. - [ ] Any follow-up work is tracked in TODO.md or an issue.
Tyler added 1 commit 2026-06-13 23:13:16 +00:00
Make the focused-view crop live in the editor canvas
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
f23b49c0d1
The annotation canvas now renders as a viewport into the focused-view
crop region, matching what core/raster.js produces on export. Sliders
update the canvas live; annotation data stays in full-image-normalized
coordinates and remains correctly positioned, sized, and editable.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Tyler added 1 commit 2026-06-13 23:21:08 +00:00
Linearize focused-view pan to the available range and flip Pan Y
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m39s
602e70a7e1
panX/panY now represent 0..1 fractions of the pannable range rather
than absolute image positions, so the slider's full travel always
covers edge-to-edge regardless of zoom level. Pan Y is inverted so
sliding right moves the view up. Updated both the editor canvas and
core/raster.js export so they stay in sync.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Tyler added 1 commit 2026-06-13 23:24:37 +00:00
Allow Backspace to delete the selected annotation
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m39s
b39fe553b2
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Tyler added 1 commit 2026-06-13 23:37:31 +00:00
Show only relevant settings per annotation type, drop redundant delete button
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
014b92675d
The annotation editor always rendered every style field regardless of
type and a "Delete annotation" button duplicating Delete/Backspace.
Tyler added 1 commit 2026-06-14 00:14:32 +00:00
Clarify the style-copy buttons' scope with a heading and richer tooltips
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
9e88991f46
Renamed "Style → step/guide" to "This step"/"Entire guide" under a
heading naming the annotation type, with hover text spelling out that
it overwrites every matching annotation's style in that scope.
Tyler added 1 commit 2026-06-14 00:38:10 +00:00
Replace the disabled "Local guide" label with a "Share as file" action
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m39s
31bdbea7b5
The guide panel's link button was a dead disabled control for local
guides. It now shares the guide as a .sfgz archive instead, while
linked guides keep the existing archive-management dialog.
Tyler added 1 commit 2026-06-14 00:50:27 +00:00
Remove the guide-link panel button; Save now syncs linked archives
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m39s
1776089c08
For linked guides, "Save now" now also writes back to the linked
.sfgz archive (reporting a lock conflict if another session holds it),
making the dedicated link/share button in the Guide panel redundant.
The toolbar Share button and More > Linked guide… menu still cover
one-off exports and archive management.
Tyler added 1 commit 2026-06-14 01:08:01 +00:00
Prompt for a name and save before creating a manual snapshot
Template tests / tests (push) Successful in 1m38s
Template tests / tests (pull_request) Successful in 1m42s
be88434e44
Clicking Snapshot now opens a named-prompt dialog (matching the app's
modal styling) and flushes the current step/guide first, so the
snapshot reflects unsaved edits and is easy to identify later.
Tyler added 1 commit 2026-06-14 01:23:42 +00:00
Add a "Make substep of…" option to the step context menu
Template tests / tests (push) Successful in 1m40s
Template tests / tests (pull_request) Successful in 1m39s
a58607f029
Lets a step be re-parented under another step by entering that step's
displayed number, moving it (with its own substeps) to the end of the
target's substeps and updating the numbering accordingly.
Tyler added 1 commit 2026-06-14 01:33:38 +00:00
Show "Make substep of…" as a hover submenu listing all steps
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
8e2e1f41fb
Replaces the number-entry prompt with a scrollable side panel (so
large guides don't overflow the screen) listing every eligible step;
clicking one immediately re-parents the step. Context menus now
support submenu items in general via contextMenu().
Tyler added 1 commit 2026-06-14 01:47:25 +00:00
Insert markdown-style [text](url) links from the Link toolbar button
Template tests / tests (push) Successful in 1m40s
Template tests / tests (pull_request) Successful in 1m40s
46d12cc829
Previously this wrapped the selection in a real <a> tag via
createLink. Now it inserts literal [text](url) markdown syntax,
using the selection as the link text or prompting for it if nothing
is selected.
Tyler added 1 commit 2026-06-14 02:08:39 +00:00
Description editor: preserve newlines on export, toggle Quote, highlight active toolbar buttons
Template tests / tests (push) Successful in 1m49s
Template tests / tests (pull_request) Successful in 1m38s
bb959a4bb9
- Enter now starts a new <p> (defaultParagraphSeparator) so line breaks
  in the description box show up as line breaks in HTML/Markdown/Confluence
  exports; htmlToMarkdown also handles <div>-separated paragraphs.
- Clicking Quote while already in a blockquote toggles back to a paragraph.
- Toolbar buttons (Bold, Italic, Bullet, Number, Quote) turn blue to
  reflect the formatting state at the current cursor/selection.
Tyler added 1 commit 2026-06-14 02:12:00 +00:00
Description editor: insert link placeholder inline instead of prompting
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
420b32c0f8
Clicking Link no longer pops up "Link text"/"Link URL" dialogs; it
inserts [Text](Link) (or [selectedText](Link)) directly so the
placeholders can be edited in place.
Tyler added 1 commit 2026-06-14 02:36:04 +00:00
Render rich text, links, and special characters correctly in PDF exports
Template tests / tests (push) Successful in 1m40s
Template tests / tests (pull_request) Successful in 1m39s
0ead121327
PDF exports now preserve bold/italic/links/lists/blockquotes from the
description editor (via a new HTML block/run parser) instead of flattening
to plain text. Literal "[text](url)" links inserted by the editor's Link
button are converted to real <a> tags before rendering. Tabs and common
"smart typography" characters (smart quotes, dashes, ellipsis, bullet) are
mapped to their WinAnsiEncoding glyphs instead of rendering as "?".

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Tyler added 1 commit 2026-06-14 02:42:37 +00:00
Fix inflated word spacing in PDF description text
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
f094bbbd73
writeDescription/emitBlocks rendered each word as a separately positioned
Tj, advancing by our approximate average-glyph-width estimate — which is
much wider than real space/character widths, producing "This  is  bold"
style gaps. Render each line as one continuous text object instead
(PdfBuilder.textRun), so consecutive Tj operators advance using the
viewer's real font metrics.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Tyler added 1 commit 2026-06-14 04:02:12 +00:00
Add quote indicator and distinct callout styling for Note/Tip/Warning/Important
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m42s
fee394f6b7
- Description editor: blockquotes get a left accent line and muted color so
  it's clear when typing in "quote mode" (matches the existing active Quote
  toolbar button highlight).
- Editor block cards: each text block's left border is colored by its level
  (info/success/warn/error) so Note/Tip/Warning/Important are distinguishable
  at a glance.
- PDF/HTML/DOCX exports: callouts now get a level-specific accent color and
  tinted background/shading (blue/green/amber/red), instead of all looking
  identical except for the label text.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Tyler added 1 commit 2026-06-14 04:11:15 +00:00
Use GitHub-Flavored Markdown alert syntax for Note/Tip/Warning/Important blocks
Template tests / tests (push) Successful in 1m40s
Template tests / tests (pull_request) Successful in 1m40s
06fba24645
Markdown export now emits > [!NOTE]/[!TIP]/[!WARNING]/[!IMPORTANT] for
text-block callouts, giving them the same colored/icon-labeled treatment
as the PDF/HTML/DOCX exports on renderers that support GFM alerts
(GitHub, Azure DevOps wikis, etc.), while degrading gracefully to a
plain blockquote elsewhere.
Tyler changed title from Make the focused-view crop live in the editor canvas to Mass guide editor changes 2026-06-14 04:17:17 +00:00
Tyler added 1 commit 2026-06-14 14:11:10 +00:00
Fix export block ordering, stale per-step UI, and cross-step block loss
Template tests / tests (push) Successful in 1m42s
Template tests / tests (pull_request) Successful in 1m41s
5d4925dee4
Exporters now interleave text/code/table blocks in the same order they
appear in the editor's Blocks panel (via a shared stepContentGroups
helper) instead of grouping by kind, so exported docs match the guide
editor's ordering.

selectStep() now also refreshes the Focused View controls and Blocks
panel (previously only done by renderAll), so switching steps no longer
leaves the previous step's blocks/focused-view sliders on screen. It
also flushes any pending edits on the outgoing step before switching, so
a later guide-wide reload (e.g. applying an annotation style to the
whole guide) can't discard unsaved text-block edits on other steps.
Tyler added 1 commit 2026-06-15 14:38:26 +00:00
Spell out "Rectangle" in tool labels instead of "Rect"
Template tests / tests (push) Successful in 1m41s
Template tests / tests (pull_request) Successful in 1m39s
a3425c36b4
Keeps the internal 'rect' annotation type id (canvas/raster/schema)
unchanged; only updates the user-facing toolbar button and shortcuts
help text.
Tyler added 1 commit 2026-06-15 14:43:12 +00:00
Show proper display names in the annotation Type dropdown
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m39s
6408040623
The annotation editor's "Type" select used the raw lowercase type id
(e.g. "rect") as its label. Add an ANNOTATION_TYPE_LABELS map so it
shows "Rectangle", "Tooltip", "Number", etc. instead.
Tyler added 1 commit 2026-06-15 14:46:35 +00:00
Use display labels for annotation types in the Annotations list and copy-style text
Template tests / tests (push) Successful in 1m40s
Template tests / tests (pull_request) Successful in 1m40s
2bb17b170e
The per-annotation list cards and the "Copy this style to every other
... annotation" text/tooltips were still showing raw type ids (rect,
arrow, etc). Use ANNOTATION_TYPE_LABELS for these too.
Tyler added 1 commit 2026-06-15 14:50:36 +00:00
Spell out "Highlight" in the annotation toolbar instead of "Hi"
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m44s
88d1fc3efb
Tyler added 1 commit 2026-06-15 15:15:18 +00:00
Add global undo for step deletion; simplify capture session UI
Template tests / tests (push) Successful in 1m41s
Template tests / tests (pull_request) Successful in 1m39s
58b4182c54
- The canvas Undo/Redo buttons now also undo/redo step deletion
  (single or multi-select), restoring the step's data, images, and
  position in the order. Backed by a new step:restore IPC call and
  GuideStore.restoreStep().
- Remove "Finish capture session" from the capture menu. The
  top-right recording bar in the guide editor is now the only place
  to start/stop recording, with its toggle relabeled
  "Start recording" / "Stop recording".
Tyler added 1 commit 2026-06-15 15:26:59 +00:00
Document the Undo/Redo shortcut in the keyboard shortcuts help
Template tests / tests (push) Successful in 1m41s
Template tests / tests (pull_request) Successful in 1m40s
db2382294e
Now that undo also restores deleted steps, it's worth surfacing the
existing Ctrl+Z / Ctrl+Shift+Z shortcut to users.
Tyler added 1 commit 2026-06-15 15:29:30 +00:00
Pushes to main (direct commits and merged PRs) and manual
workflow_dispatch now trigger the test job; feature-branch pushes and
PR open/sync no longer do.
Tyler merged commit e588f93a19 into main 2026-06-15 15:37:48 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tyler/StepForge#18