PhoenixKit 1.7.112: Folder trash, a media gallery and new list components
PhoenixKit 1.7.112 lets admins move whole media folders to the trash and drag folders between places. It also adds a set of building blocks for modules.
Media folders
Trashing a folder now also trashes its subfolders and every file in them; restoring brings them back. Folders can be dragged in the grid, the list and the sidebar, or onto the trash. A new folder appears at once as “untitled”, ready to rename. File and folder menus no longer get cut off, and the breadcrumb no longer repeats the current folder.
For module authors
New components include MediaGallery to pick and order a set of images, a MediaViewer lightbox, a folder tree, <.sort_selector>, <.bulk_actions_bar>, <.empty_state>, <.form_section> and <.form_actions>, plus sort and drag options for <.table_default>. The back arrow of admin_page_header no longer shows; back is kept only so existing code compiles. Russian and Estonian translations cover e-commerce, projects and comments.
Upgrading
Run mix phoenix_kit.update for V119, which adds folder trash and the dimension annotation, and V120, which adds document categories and types for the Document Creator module.
Full release notes: PhoenixKit 1.7.112
1.7.112 · 18 May 2026
Added
PhoenixKitWeb.Components.MediaGallery— reusable LiveComponent for selecting, ordering, previewing and removing a set of images.PhoenixKitWeb.Components.MediaViewer— standalone image lightbox LiveComponent (prev/next, keyboard, download). Extracted fromMediaGallery; usable independently.Storage.get_files/1— batch file fetch preserving input order.FolderExplorercomponent — folder tree extracted fromMediaBrowseras a reusable component (PR #544).<.table_default>sort + drag-to-reorder primitives (PR #548)- New
:sort_barslot rendered above the toolbar, visible in both card and table views. <.table_default_body>accepts:globalattrs so consumers can wire theSortableGridhook (phx-hook,data-sortable-*) directly onto<tbody>.<.table_default_header_cell>:inner_blockis now optional — empty<th>cells for drag-handle / selection columns no longer need a placeholder.:card_bodyslot for fully-custom card content;:card_classaccepts a string or(item) -> stringfunction;:above_cardsslot;2xl:grid-cols-4card grid.
- New
<.sort_selector>core component — field-picker select + direction toggle, with amanual_fieldmode that swaps the toggle for a drag-handle hint (PR #548).<.bulk_actions_bar>core component — selection counter + action-button slot + Clear button;wrapper_classcovers the inline-card and sticky/blurred shapes (PR #548).<.empty_state>core component —compact/card/featured“no rows” panels with optional icon, description, and CTA slot (PR #548).<.form_section>and<.form_actions>core components — card-wrapped titled form sections and a Cancel + Submit footer bar (PR #548).- New
PhoenixKit.Utilshelpers (PR #548)Reorder.reorder/4— two-phase index-rewrite primitive for drag-to-reorder list views; schema-agnostic, UUID-filtered, payload-capped, returns{:ok, count}.Values.blank_to_nil/1andValues.presence/1— canonical"" → nilhelpers (the latter trims first); previously duplicated across 7+ modules.Format.bytes/2— single human-readable byte formatter with:decimals/:unknown/:base(1024 vs 1000) options; replaced 8 private copies.
- V120 migration — document-creator category / type taxonomy (PR #545).
Changed
MediaSelectorModalaccepts an optionalnotify: {module, id}to deliver the selection viasend_updateinstead of a process message.MediaGallerydelegates its inline lightbox toMediaViewer— no behavior change for existing consumers.<.draggable_list>gains an optionaltargetattr (CSS selector). When set, theSortableGridhook routes the reorder event viapushEventToso it reaches a LiveComponent rather than the host LiveView.<.sort_header_cell>polish — inactive-column up/down hint, in-flight loading spinner, and atom-or-stringsort.dirtolerance (PR #548).admin_page_header—back/back_clickare now deprecated no-ops; the back arrow no longer renders. Retained so existing call sites compile (PR #548).MediaBrowserfolder management overhaul (PR #544)- Recursive folder trash + drag-to-trash; instant “untitled” folder creation.
- Folders draggable across grid / list / sidebar; drop-into-current-folder via the main content area; whole-selection drag in select mode.
- Per-file and per-folder kebab menus migrated to
TableRowMenu(fixes clipping). - Folder rename made more apparent; click-away cancels.
- etcher / fresco dependency requirements tightened to
~> 0.2.6. - Upgraded library dependencies.
Fixed
MediaGallerydrag-to-reorder no longer pushesreorder_imagesto the host LiveView (where it had no handler and crashed the page). The grid now passestargetto<.draggable_list>so the event reaches the component’s ownhandle_event/3.MediaBrowserbreadcrumbs no longer duplicate the current folder or ignore scope; move-to-root now works under scope;update_folder/3guarded againstparent_uuid: nil; N+1 in session breadcrumb work eliminated (PR #544).admin_page_headerno longer carries an unusedIconimport left by the back-button removal — restores a cleanmix compile --warnings-as-errors.Utils.Values.blank_to_nil/1andpresence/1no longer raise on non-string input (e.g. a list from akey[]=query param) — they fall back to pass-through andnilrespectively.- V120 migration review fixes — primary-key defaults, multi-prefix guards, exact
legacy category mapping,
uuid_generate_v7()per house convention (PR #545). - Avatar dropdown overflow, scroll, hover, and click-feedback fixes.
i18n
- Ecommerce gettext manifest +
ru/ettranslations; fixed 91 fuzzy ecommerce translations (PR #547). - Projects + comments gettext manifests with
et/rutranslations (PR #542). - Global Gettext locale synced alongside the backend-specific one.
PhoenixKit 1.7.112. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.