PhoenixKit 2.41.4: Media picker grouped by folder
PhoenixKit 2.41.4 gives modules a media picker that lists files folder by folder, and fixes picker pages that could repeat one file and skip another.
A module that opens the picker on a folder with subfolders can now ask for group_by_folder: true. Files are then shown folder by folder, starting with the scope folder, each group under a heading with the folder’s path and file count. A folder split by a page break repeats its heading, marked “continued”. Modules can also give folders their own names in those headings and open the picker over the whole screen, with up to 10 columns and 60 files a page. The media gallery component passes these options through.
The fix: files uploaded in the same second had no fixed order, so moving between pages could show one file twice and miss another. They are now ordered by their id as well.
Full release notes: PhoenixKit 2.41.4
2.41.4 · 28 September 2026
Added
MediaSelectorModalgroup_by_folder: true— a picker scoped to a folder with subfolders lists its files folder by folder (the scope folder first, then subfolders in path order with numbers sorted by value, newest first within each), each run opened by a heading tile with the folder’s path and file count; a folder cut by a page break repeats its heading marked “continued”. A linked-in file groups where it is linked unless its home folder is inside the scope (#879).MediaSelectorModalfolder_labels(%{folder_uuid => name}) names folders in those headings, andsize: :fullopens the picker over the whole viewport with up to 10 columns and 60 files a page (#879).MediaGalleryforwardsgroup_by_folder,folder_labelsandpicker_sizeto its picker (#879).
Fixed
- The media picker’s pages have a stable order: files uploaded in the same
second (
inserted_atis second-precision) are tie-broken by uuid, so paging no longer repeats one file and skips another.
PhoenixKit 2.41.4. Install or update: {:phoenix_kit, "~> 2.41"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.