PhoenixKit 1.7.121: Native modal dialogs and bulk selection for admin lists
PhoenixKit 1.7.121 changes how every PhoenixKit modal is drawn and adds building blocks for admin lists. It also puts the language switcher on all account pages.
<.modal> now opens a native browser dialog above the page, so a parent element’s stacking can no longer hide it. A dialog that LiveView closed by re-rendering no longer stays invisible on top of the page, swallowing clicks.
For module authors, core adds bulk selection with a toolbar, drag-to-sort rows, a reorder dialog and a Load more footer. Sorting by field and direction no longer races. PhoenixKit.boot/1 lets modules that load late register after the app starts.
The sign-in page layout now holds the language switcher, shown when more than one language is enabled, so it also appears on the password reset, magic link and confirmation pages. Users, sessions, user settings and the Modules page are fully translated in Russian and Estonian, and activity dates follow the reader’s language.
Upgrading
Run mix phoenix_kit.update. It adds |> PhoenixKit.boot() after Supervisor.start_link(children, opts) in your application module, or warns you to add it by hand when that line has another shape.
Full release notes: PhoenixKit 1.7.121
1.7.121 · 25 May 2026
Added
- Core list-UI toolkit for admin tables, all in
lib/phoenix_kit_web/components/core/(PR #568):BulkSelect—<.bulk_select_scope>+<.bulk_select_header_cell>+<.bulk_select_cell>+<.bulk_actions_toolbar>. Selection lives client-side via theBulkSelectScopeJS hook (per-checkbox toggles feel instant — no LV round-trip); the server only receives the selected uuids at action time as%{"uuids" => [...]}. The selection survives LV re-renders (reorder / load_more / sort).Sortable—<.sortable_tbody>+<.sortable_row>wrap theSortableGridhook wiring;enabled={false}cleanly omits the hook so drag turns off when sorting by a non-position field. Pair with<.drag_handle_cell>/<.drag_handle_header_cell>on<.table_default>.<.reorder_modal>— strategy-picker dialog for bulk reorder; the consumer LV owns the strategy whitelist.<.load_more>pagination footer (incore/pagination.ex) for embeddable / DnD-aware lists where rows append rather than navigate away.
<.modal keep_in_dom>mode — renders the<dialog>regardless of@showand flips visibility viadata-show+ thePkDialoghook, enabling instant client-side open without a server round-trip (PR #568).PhoenixKit.boot/1hook so late-loaded modules can register after app start (PR #569).
Changed
<.modal>now renders a native<dialog>in the browser top layer (PkDialoghook +showModal()) instead of<div class="modal">. It is immune to ancestor stacking contexts / z-index and covers the full visual viewport (PR #568).<.sort_selector>is now race-free: the field select sends onlysort_byand the direction arrow sends onlysort_dir; the LV handler derives the missing half from assigns. Manual-order mode hides the direction toggle entirely (PR #568).<.table_default>rows carry a namedgroup/rowTailwind marker (not a baregroup) so the drag-handle hide-until-hover reveal stays keyed to row hover without clobbering unnamedgroup-hover:utilities nested in cells (PR #568).- Activity feed renders dates with locale-aware formatting (PR #569).
redirect_invalid_locale/2readsprefixless_primary?()once instead of twice, removing a torn-read window on a concurrent setting flip (PR #554 follow-up).- Annotation storage adapter no longer accepts
:creator_uuidfrom event payloads — authorship is resolved server-side from the actor, so a forged payload can’t claim it (PR #550 follow-up).
Fixed
- PkDialog top-layer leak: a
<dialog>opened viashowModal()stayed in the top layer (still capturing all clicks) after Phoenix LV’s DOM patcher stripped the browser-addedopenattribute on re-render, while CSS rendered itdisplay: none— visually closed but blocking the rest of the page.PkDialognow uses the:modalpseudo-class as the truth source and restores the stripped attribute beforeclose()(PR #568). - The “Reorder N selected” bulk-toolbar label was rendered untranslated: it
used
gettext_noop/1(extraction-only) and the JS hook does no translation, so it stayed English in every non-default locale. Now translated at render time while preserving the%{count}placeholder for client-side interpolation (PR #568 post-merge review). <.drag_handle_cell>’s default title now renders (thedefault: nilattr was shadowingassign_new) (PR #568).- Registration and magic-link registration fieldsets unified to
class="fieldset min-w-0"(dropped redundantw-full) (PR #559 follow-up). - Combined the split revoke-all-sessions confirmation sentence into one translatable string (PR #569).
- Guard
stat.labelagainst non-binary values in the modules overview (PR #569).
i18n
- Broad i18n coverage sweep across the user-facing admin pages — Users management, Session management, Live Sessions, User Settings, the General settings sidebar tab, and the Modules overview — with ru/et catalogs brought back to 100% and fuzzy msgids / mistranslations corrected (PR #569).
- Translate the stranded “Last updated:” label in Live Sessions (PR #569).
PhoenixKit 1.7.121. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.