feat(editor): inline-math shortcut, /math immediate entry + save chords, taller answer faces #729

Merged
raisondetredev merged 4 commits from refs/pull/729/head into main 2026-07-06 23:39:55 +02:00
raisondetredev commented 2026-07-06 23:38:10 +02:00 (Migrated from codeberg.org)

What's in here

  • Ctrl/Cmd+Shift+F inserts inline math in every editor surface (flashcard faces, notes, PDF page-notes, path steps). With a text selection the dialog opens pre-filled and the confirmed formula replaces it — this also fixes the toolbar's sigma button silently dropping the formula when a range was selected. Chord choice: Notion's Ctrl+Shift+E is already center-align here and Ctrl+Shift+M is Chrome's un-interceptable profile switcher, hence F ("formula"). The chord lives in the shared bindings map (halkyonScriptShortcutBindingshalkyonEditorShortcutBindings).
  • /math drops straight into the fullscreen LaTeX editor — no extra tap on the placeholder block. Leaving with nothing saved removes the fresh block again, so a cancelled /math leaves no orphan; content saved via Ctrl+S survives a later Cancel.
  • Save chords in the math and callout editors (new shared SaveShortcuts widget): Ctrl/Cmd+Enter saves and closes (same as the Save button); Ctrl/Cmd+S saves in place through a new onApply channel and resets the dirty baseline, so exiting afterwards skips the discard prompt. The callout body also binds onSubmit because AppFlowy sees Ctrl+Enter before the screen-root CallbackShortcuts.
  • Manual creator: expanded answer faces get the same editor height as the Front — the single-answer Back spent ~52 dp of its 220 dp box on the "Add answer" row; the open multiple-choice card was capped at 180. Both now give the editor the Front's 220. Also drops a dead maxHeight on the expand: true path.
  • Docs: documents the scripts/flutter.sh build-defines workflow in the bootstrap architecture doc.

Tests

Chord-registration and end-to-end chord tests (Ctrl+Shift+F → dialog → insert), prompt-flow tests (prefill / replace / cancel), save-chord tests for both fullscreen editors, and the three /math flows (save writes the equation, cancel removes the block, Ctrl+S-then-cancel keeps it). fvm flutter analyze clean; all affected suites green.

## What's in here - **Ctrl/Cmd+Shift+F inserts inline math** in every editor surface (flashcard faces, notes, PDF page-notes, path steps). With a text selection the dialog opens pre-filled and the confirmed formula replaces it — this also fixes the toolbar's sigma button silently dropping the formula when a range was selected. Chord choice: Notion's Ctrl+Shift+E is already center-align here and Ctrl+Shift+M is Chrome's un-interceptable profile switcher, hence F ("formula"). The chord lives in the shared bindings map (`halkyonScriptShortcutBindings` → `halkyonEditorShortcutBindings`). - **`/math` drops straight into the fullscreen LaTeX editor** — no extra tap on the placeholder block. Leaving with nothing saved removes the fresh block again, so a cancelled `/math` leaves no orphan; content saved via Ctrl+S survives a later Cancel. - **Save chords in the math and callout editors** (new shared `SaveShortcuts` widget): Ctrl/Cmd+Enter saves and closes (same as the Save button); Ctrl/Cmd+S saves in place through a new `onApply` channel and resets the dirty baseline, so exiting afterwards skips the discard prompt. The callout body also binds `onSubmit` because AppFlowy sees Ctrl+Enter before the screen-root `CallbackShortcuts`. - **Manual creator: expanded answer faces get the same editor height as the Front** — the single-answer Back spent ~52 dp of its 220 dp box on the "Add answer" row; the open multiple-choice card was capped at 180. Both now give the editor the Front's 220. Also drops a dead `maxHeight` on the `expand: true` path. - **Docs**: documents the `scripts/flutter.sh` build-defines workflow in the bootstrap architecture doc. ## Tests Chord-registration and end-to-end chord tests (Ctrl+Shift+F → dialog → insert), prompt-flow tests (prefill / replace / cancel), save-chord tests for both fullscreen editors, and the three `/math` flows (save writes the equation, cancel removes the block, Ctrl+S-then-cancel keeps it). `fvm flutter analyze` clean; all affected suites green.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-learn!729
No description provided.