Skip to content

Locations 0.6.0: Drag-and-drop uploads that just work, and safer space moves

Locations 0.6.0 moves the PhoenixKit locations module onto core’s shared toolkits, makes drag-and-drop uploads work without any setup in the host app, and fixes a set of problems with space moves, uploads and saves.

Uploads without extra setup

The drag-and-drop area on a location’s or space’s files card relies on a small piece of JavaScript. Until now a host app had to import the module’s hooks itself, and on an app that did not, dropping files did nothing. The module now ships that code prebuilt and declares it to PhoenixKit, which adds it to the app’s bundle. A host wires nothing.

Uploads also behave better:

  • An upload that could not be filed no longer stays in the list at 100% and no longer counts against the upload limit.
  • Uploading a file that is byte for byte the same as one already there now shows a notice instead of silently adding nothing.
  • A save no longer drops or replaces a files folder that was set up while the form was open.

Shared toolkits from core

Recording who made a change, the activity log, the space tree queries, files folders, uploads, file icons and sizes, the media reorganizer and the language tabs on edit forms now use PhoenixKit core’s shared code instead of the module’s own copies.

The admin header now shows paths such as Locations / New location and Locations / Types / New type, and for an existing location its name followed by Edit or Structure. The location and location type forms open in the language you are viewing the admin in.

Spaces that stay in one piece

  • Two opposite moves of spaces at the same moment could both pass the loop check and leave spaces inside each other. A move, including one to the top level, now locks the location’s tree while it runs. A very deep tree, more than 64 levels, is no longer mistaken for a loop.
  • An update to a space that named another location could move it out of its location and leave its children behind. It can no longer.
  • Saving a space or location that another session had deleted crashed the page. It now shows a not-found message instead.

Upgrading

Locations 0.6 needs PhoenixKit 2.38.0 or later (and below 3.0). No migration. If your app imported the module’s colocated hooks for the files card, that import is no longer needed.

Full release notes: Locations 0.6.0

0.6.0 · 26 September 2026

Changed

  • Requires phoenix_kit >= 2.38.0 and < 3.0.0. Actor resolution, activity logging, space tree queries, resource folders, uploads, file icons/sizes, the media reorganizer and the edit-language tabs now run on core’s shared toolkits instead of module copies.
  • The dropzone hook ships as a prebuilt bundle declared by js_sources/0, so a host no longer has to import the module’s colocated hooks.
  • Admin header shapes: “Locations / New location”, “Locations / <name> / Edit”, “Locations / <name> / Structure”, “Locations / Types / New type” and “Locations / Types / <name> / Edit”.
  • The location and location-type edit forms open on the viewing language.
  • update_location/3 returns {:error, :location_not_found} and update_space/3 returns {:error, :space_not_found} for a record deleted since the caller loaded it, instead of raising Ecto.StaleEntryError.

Fixed

  • Two opposite space re-parents at once could both pass the cycle check and commit a loop. A re-parent (a move to the top level included) now holds the location’s tree lock. The cycle check no longer calls a chain deeper than 64 levels a cycle.
  • A space update carrying another location_uuid could move it out of its location and strand its children.
  • A save could drop or replace a files folder claimed while the form was open.
  • The files card’s drag-and-drop hook never reached a host that did not import colocated hooks.
  • An upload that could not be filed stayed in the list at 100% and counted against the upload limit.
  • A byte-identical re-upload now shows a notice instead of silently adding nothing.
  • Saving a space or location deleted in another session crashed the page.

Locations 0.6.0. Install or update: {:phoenix_kit_locations, "~> 0.6"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.