PhoenixKit 1.7.111: Callouts, text labels and titles for media annotations
PhoenixKit 1.7.111 adds new annotation tools to the media viewer: callouts with a line to a label, free text labels and an eraser, with undo and redo from Etcher 0.2.
Every annotation can carry a short title of up to 200 characters, shown on the shape. The annotation popover has a title field above the comment, and a title alone is enough. Undoing the deletion of an annotation brings its comments back. Annotations now also work on fresh uploads whose smaller versions are not made yet. In the viewer, arrow keys move the text cursor while you type instead of jumping to the next image.
The admin language menu scrolls when it is taller than the screen. Modules with their own translation files now follow the page language too. Migration V117 adds document sections and template presets for the Document Creator module.
Upgrading
Run mix phoenix_kit.update for V117 and V118. phoenix_kit.js no longer bundles the Fresco, Tessera and Etcher hooks: import their own priv/static scripts in app.js before phoenix_kit.js.
Full release notes: PhoenixKit 1.7.111
1.7.111 · 14 May 2026
Added
- V118 migration: callout + text annotation kinds + optional
titlecolumn onphoenix_kit_annotations(PR #541)- Widens
phoenix_kit_annotations_kind_checkto include"callout"(leader-line annotation: anchor point + line to a labeled bbox) and"text"(freestanding click-drag text label). Both new tools shipped in Etcher 0.2; the CHECK update is folded into a singleDROP + ADDso we don’t take two trips over the same constraint - Adds nullable
title varchar(200)column. Every kind can carry a short label — renders inline on the shape (above the bbox for rect/circle/polygon, at the leader endpoint for callout, inside the bbox for text). Length matches the schema-sidevalidate_length(:title, max: 200). Lives in its own column so it stays queryable outside the JSONB blob Annotationschema gains:titlefield + the two new kinds in@kinds;@cast_fieldsallows it through the changeset
- Widens
PhoenixKit.Annotations.restore_linked_comments/3(PR #541)- Undo-of-delete support: when an annotation deletion is reversed via Etcher’s undo stack, the original uuid is gone but the soft-deleted comments still reference it through
metadata.annotation_uuid. The function flips matchingstatus: "deleted"comments back to"published"and rewrites theirmetadata.annotation_uuidto point at the recreated row. Returns count restored. No-ops cleanly when PhoenixKitComments isn’t installed
- Undo-of-delete support: when an annotation deletion is reversed via Etcher’s undo stack, the original uuid is gone but the soft-deleted comments still reference it through
AnnotationComposertitle input (PR #541)- Optional title field above the comment textarea. Title-only annotations are now allowed (skips the comment-thread create entirely; the row gets only its
titlecolumn set).update_draftaccepts bothcommentandtitlekeys, debounced 500ms each. Title persistence threaded through:annotation_composer_posted→MediaBrowser.finalize_annotation_compose/3
- Optional title field above the comment textarea. Title-only annotations are now allowed (skips the comment-thread create entirely; the row gets only its
MediaBrowseretcher 0.2 wiring (PR #541)etcher:updatednow accepts any combination ofgeometry / style / metadata / titlein one payload (previously geometry-only). In-memory annotation list mirrors writes so the tooltip reflects the new title without waiting for aload_annotations_for/1round-trip- Composer popover suppressed for
kind == "text"(content arrives inline via etcher’s foreignObject editor) andrestore: true(recreated row already has its title/metadata; user wasn’t trying to create a new annotation) - On
restore: true+restore_from_uuid, walks soft-deleted comments viarestore_linked_comments/3and refreshes the comments sidebar - Tool list extended:
[:rectangle, :circle, :polygon, :freehand, :callout, :text, :eraser] - Etcher overlay now attaches to the Fresco viewer even when Tessera has no sources (pre-PR: an empty
tessera_sources(f)fell back to a plain<img>with no annotation overlay at all). Annotations now work on fresh uploads that haven’t been through the variant generator
ViewerKeydownJS hook (PR #541)- Replaces
phx-window-keydown="viewer_keydown"on the viewer modal. Two filters the stock binding couldn’t express: (1) onlyEscape/ArrowLeft/ArrowRightreach the server (letter keys no longer spam LV logs), (2) navigation keys suppressed while focus is in<input>/<textarea>/ contenteditable so arrow keys move the text caret instead of flipping the modal to the next image while typing
- Replaces
- Post-merge review doc in
dev_docs/pull_requests/2026/541-v118-callout-text-etcher-0.2/CLAUDE_REVIEW.mdwith finding disposition table
Changed
{:etcher, "~> 0.1"}→{:etcher, "~> 0.2"}— adds callout / text / eraser tools, undo/redo, satellite titles, and a completewindow.Etcher.layerFor(id)programmatic control surface (PR #541)AnnotationComposertextareaphx-debounce150 → 500ms — quieter LV logs at typical typing speed, no perceived input lag (PR #541)priv/static/assets/phoenix_kit.jsstrips 584 lines of inlined fresco / tessera / etcher hooks. Parent apps now import each lib’s ownpriv/static/bundle ahead ofphoenix_kit.js, and phoenix_kit adoptswindow.{Fresco,Tessera,Etcher}Hooksintowindow.PhoenixKitHooks. Eliminates drift between the inlined snapshot and the hex packages (PR #541)
Hygiene
- Lockfile updates:
fresco 0.1.1 → 0.1.2
PhoenixKit 1.7.111. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.