OpenGraph 0.3.3: The assignment modal no longer crashes on picking a template
OpenGraph 0.3.3 fixes the Assignments page, which could not save anything: the edit modal crashed as soon as you picked a template.
An assignment cannot be saved without a template, and choosing one is what crashed the modal, so no template could be assigned from the admin. The modal now gets the preview loading state it was reading, and picking a template shows the preview as intended. The modal had been broken this way for several releases, because the faulty part only rendered once a template was chosen.
The scope, group and template pickers, the preview pickers and the slot wiring forms now have ids, so LiveView can restore what you entered after a reconnect. Their labels and fields also use daisyUI 5 classes.
Full release notes: OpenGraph 0.3.3
0.3.3 · 14 August 2026
Fixed
-
The assignment modal crashed with
KeyError :preview_loadingas soon as a template was picked, which made the assignments screen unusable end to end: an assignment cannot be saved without choosing a template, and choosing one is what crashed.edit_modal/1is a function component, so@preview_loadingin its body reads that component’s assigns — and it was neither declared as anattrnor passed at the call site. Both are now in place (#8, #7).It survived four releases because the read sits behind
:if={@selected_template}, and HEEx wraps the whole component invocation — attribute expressions included — in that conditional, so the modal rendered fine until a template was picked. Nothing warns at compile time. -
The three scope/group/template forms had no
id. Aphx-changeform without one silently disables LiveView form recovery.
Added
- LiveView test plumbing (
test/support/{live_case,test_endpoint,test_hooks, test_layouts,test_router}.ex) — this package had none, so nothing could render a LiveView under test. Plus a regression guard pinning the invariant the bug broke:edit_modal/1reads no assign it neither declares nor assigns, and the call site passespreview_loadingthrough (the attr defaults tofalse, so a dropped pass-through would otherwise kill the spinner silently).
Changed
- Dependency updates:
phoenix_kit2.4.0. The~> 2.0pin is unchanged — nothing here uses core’s newSlug.put_slug/3.
OpenGraph 0.3.3. Install or update: {:phoenix_kit_og, "~> 0.3"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.