PhoenixKit 2.13.18: Esc closes one dialog at a time, sharper media images
PhoenixKit 2.13.18 fixes dialogs opened inside other dialogs: one press of Esc closed them all. Now it closes only the top one.
A dialog that belongs to a component, such as the item selector, also sent its close event to the wrong place, so its inner details popup did not close on Esc. Infinite scroll inside a component had the same problem and now loads more rows.
Other fixes:
- The media selector showed blurry images: it stretched the 150px thumbnail over each tile. It now uses the larger card image, and card-size slots elsewhere prefer the medium image over the thumbnail.
- Notification digests are translated and sent in each recipient’s language, not the server’s.
- Admin tabs and the sidebar highlight the right item again when the address carries
?parameters or a#fragment. mix igniter.install phoenix_kitnow offers to run the migrations and rebuilds the assets, steps that were skipped on that command.- The daisyUI warning no longer tells sites on daisyUI 5.1 to 5.5 that their modals are broken; it only says a newer version exists.
- Without igniter, the install tasks offer to add it instead of crashing.
Full release notes: PhoenixKit 2.13.18
2.13.18 · 31 August 2026
Dialog layering, component-scoped pushes and an image-quality sweep (PR #777),
plus the post-merge review fixes for each
(dev_docs/pull_requests/2026/777-pkdialog-esc-layering-component-routing/CLAUDE_REVIEW.md)
and the igniter-recovery work on the install/update tasks.
Fixed
-
Esc closed both popups when one dialog was stacked inside another. Chromium groups the close watchers of dialogs whose
showModal()ran without user activation - which is every dialog LiveView opens from a patch- so a single Esc fired
cancelon the whole stack.PkDialognow keeps the outer dialog open and relays the request to the deepest stacked child in its own semantics;preventDefaultalone was not enough, since Chromium stops the grouped chain at the first prevented watcher and the child’s own cancel then never fired. Openness is matched with:modal, not theopenattribute, which morphdom can strip between a patch and the next sync.
- so a single Esc fired
-
A component-owned modal’s close event landed on the host LiveView.
pushEventTowith an element resolves the target from that element’sphx-target, which a<dialog>does not carry, so the push fell through to the LiveView: the item selector’s stacked details popup never closed on Esc, and the selector itself only “closed” because the misrouted event hit the host. BothPkDialogandInfiniteScroll’s load-more sentinel (useless inside a LiveComponent for the same reason) now push to the owning component by numeric CID, through one shared helper that stops its search at a nested LiveView root - a component on the far side of one belongs to a different view, and its CID means nothing to the pushing socket. -
A stacked close could strand a dialog the server never heard about. The parent marks the child it closed so the child’s own
closehandler does not double-push - but that handler is exactly what was observed not to run in this stack, and the boolean marker then suppressed the child’s next genuine close for the life of the element (the server kept believing it was open, and re-opened it on the following patch). The marker is now a timestamp with a one-second window, so a stamp whose event never arrives expires instead. -
Tab matching broke on a query-carrying
current_path. Pages that publish their full URL into:url_path(so the language switcher can rebuild locale links without dropping state) handedTab.matches_path?/2a path with?…attached, which no exact or prefix rule could match.normalize_path/1strips the query and the fragment; matching is about the path.AdminNav.parse_admin_path/1- the sidebar’s own matcher, and the reason a highlighted tab could sit above an unhighlighted sidebar item - stripped only the query, and its?tab=extraction turned?tab=files#topinto the tab"files#top". Both now cut on?and#. -
Card-size image slots served the smallest variant.
resolve_url/2preferred the 150px thumbnail over an 800px medium wheneversmallwas missing, and an explicit:mediumrequest preferred the thumbnail outright- the untyped clauses had the ordering inverted relative to the
file_type: "image"clauses they mirror. The media selector’s grid also asked for the default:smalltier and stretched a 150px thumbnail across an aspect-square tile; it now asks for:card, as the media browser’s own grid already did.
- the untyped clauses had the ordering inverted relative to the
-
Digest notifications rendered in the server’s locale, not the recipient’s. The digest strings were built with
Gettext.dgettext/3- invisible tomix gettext.extract, so they had never been translated - and are nowgettext/2calls that extract normally. That alone would not have reached anyone:gettext/2resolves the locale from the calling process, and an Oban worker starts on the default one, so the new translations would have rendered in English for every recipient. Both digest surfaces (the channel envelope, which already resolved the recipient’s locale for the channel, and the persisted in-app inbox row) now build their text insideGettext.with_locale/3.%{label}stays English: type labels are runtime registry data that extraction cannot see. -
The installer’s post-install steps never ran on the recommended entry point.
mix igniter.install phoenix_kit- the command this task’s own help recommends - composes installers throughIgniter.Mix.Task.configure_and_run/3, which invokes the task’signiter/1callback and nothing else. Everything parked inMix.Tasks.PhoenixKit.Install.run/1aftersuper(argv)was therefore dead code on that path: the interactivemix ecto.migrateprompt, the asset rebuild, and the database connectivity check. Hosts saw• mix ecto.migratein the closing notice and were never offered the migration, and their assets were never rebuilt after the CSS/JS integration wrote toapp.cssandapp.js. Those steps now ship as a queuedmix phoenix_kit.post_installtask (Igniter.add_task/3), which runs after changes are committed on both entry points - and is correctly skipped on--dry-run, where the old code would have migrated anyway.run/1no longer duplicates the work. -
Two “PhoenixKit ready!” banners. Igniter runs queued tasks before printing notices, so a successful migration announced readiness moments before the closing notice did. The migration path now reports what it did (and the resolved sign-up path) and leaves the banner to the notice, whose
mix ecto.migratestep is marked as applying only if the prompt was skipped. -
The daisyUI version warning accused healthy installs of a rendering bug.
PhoenixKit.Install.DaisyUI.outdated_warning/1fired below 5.6.0 but its copy described the pre-5.1 failure mode (phantom right-edge strip, ~15px content shift around modals), so every host in the 5.1-5.5 band - including a freshly scaffoldedmix phx.newapp, which vendors 5.5.19 - was told its modals were broken when they were not. Newseverity/1splits the two bands::brokenbelowgutter_fix_version/0(5.1.0, where daisyUI made the modal scrollbar gutter conditional) keeps the bug report;:behindgets an advisory heads-up that says nothing is broken. Unparseable versions take the benign branch.mix phoenix_kit.doctormakes the same split. The floor stays 5.6.0 - it is the release that finished the modal gutter fix (scrollbar-gutter: auto), not merely a recent tag. -
Installer notices rendered as orphan
*bullets. Igniter renders each notice as a*bullet, so the four notices whose heredoc opened with a blank line printed a bare*with the body pushed to the next line: the layout recompile notice, the CSS integration notice, the migration-ready notice, and the closing “PhoenixKit ready! Next:” block. All now trim, the way the Oban notice already did. -
PhoenixKit V2.13.17read as a migration version. A capitalVprefix means a migration version in this codebase (V181), and the package version carried one on the line directly aboveTarget version: V181. Lowercased. -
Dropping igniter crashed the igniter tasks instead of explaining itself. Igniter is an optional dependency, so
mix phoenix_kit.install,.update,.gen.admin.pageand.gen.user.dashboardare wrapped in a compile-timeCode.ensure_loaded?(Igniter.Mix.Task)guard whoseelsebranch prints the “add{:igniter, "~> 0.7", only: [:dev, :test]}” guidance. That branch is chosen when PhoenixKit is compiled into the host’s_build, and PhoenixKit is not recompiled when the host’s own dependency list changes - so a project that installed while igniter was on the path and later dropped it kept a beam that had taken the igniter branch, and got** (UndefinedFunctionError) function Igniter.Mix.Task.help_requested?/1 is undefinedfrom the generatedrun/1. NewPhoenixKit.Install.MissingIgniter.ensure_available!/1re-asks the question at the top of each task’srun/1, so the guidance is printed whether the compiled branch was right or has since become a lie.
Added
- The igniter-backed tasks now offer to add the dependency instead of only
naming it. With igniter genuinely absent,
PhoenixKit.Install.MissingIgniterprints what is missing and asks to write{:igniter, "~> 0.7", only: [:dev, :test]}into the host’sdeps/0(auto-accepted under--yes/-y), then shells out tomix deps.get- a fresh OS process, since the running one evaluatedmix.exsat boot and cannot see the new dep. It stops there and names the one command to re-run: PhoenixKit itself has to recompile to pick the other side of itsCode.ensure_loaded?(Igniter.Mix.Task)guard, which cannot happen inside a run that is already executing the wrong side. Declining, a MIX_ENV whereonly: [:dev, :test]would not help, an unrecogniseddeps/0(anything but the list shape the generators emit - it never guesses), or a failed fetch all fall back to the manual instructions, each carrying only the part that is still true - a declined prompt is not re-told what it just declined, and a failed fetch is not told to add a line that is already written. - The opposite staleness is diagnosed too. A host that installed
PhoenixKit without igniter and added it afterwards keeps the compiled
stand-in task, so following its own advice appeared to change nothing.
stand_in_run/2now notices that igniter is loadable and asks formix deps.compile phoenix_kit --forcerather than repeating the instructions the host already followed.
i18n
- Russian and Estonian catalogues are complete again (ru: 82 untranslated → 0), including the newly extractable digest strings. The refresh added 57 msgids overall; de/es/fr/it/pl carry them untranslated (160 → 212) and fall back to the msgid, so nothing renders empty - those five still want a dedicated sweep.
Changed
- The install warning glyph is reserved for things that need attention.
The rate-limiter and Oban “configuration added” notices used
⚠️(and, for Oban,IMPORTANT: Restart your server) for what is a routine config write- on a fresh install there is no server running, and the closing steps tell
you to start one. They now use their modules’ neutral glyphs with the
restart advice as a parenthetical, correct on both the install and update
paths.
⚠️is left to the daisyUI and dashboard-deprecation advisories.
- on a fresh install there is no server running, and the closing steps tell
you to start one. They now use their modules’ neutral glyphs with the
restart advice as a parenthetical, correct on both the install and update
paths.
PhoenixKit 2.13.18. Install or update: {:phoenix_kit, "~> 2.13"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.