Skip to content

0.11.0 - 2026-11-29

Latest

Choose a tag to compare

@ddon ddon released this 29 Nov 09:53
· 1 commit to main since this release

Upgrade notes

  • Migration: chain V3 and V4. Run mix phoenix_kit.update. V3 adds
    nullable latitude / longitude (numeric(9,6)) with range CHECKs and an
    index on the pair. V4 adds the nullable geocode_miss. Both are additive;
    existing rows read NULL.
  • Geocoding is opt-in and off by default. Without a configured
    :geocoder, nothing changes beyond the new form fields.

Added

  • Coordinates on a location. Latitude and longitude sit on the form's
    Details tab. They are both-or-neither and range-checked in the changeset
    and by the database.
  • Opt-in geocoding. A host implements the PhoenixKitLocations.Geocoder
    behaviour and sets config :phoenix_kit_locations, geocoder: Mod, geocode_on_save: true. With that config, a save that changes the address,
    or leaves the location without coordinates, enqueues
    Workers.GeocodeWorker (Oban, :default queue). Coordinates typed in the
    same save win.
    • The job writes only if the row still has the address and the coordinates
      it was queued for. A late result never overwrites an edited address or
      coordinates typed by hand.
    • A provider :not_found is remembered for that address, so saves stop
      asking until the address changes.
    • The other entry points are Geocoding.enqueue/2, geocode_now/2 and
      enqueue_missing/1 (backfill). Writes log location.geocoded.
  • Distance. PhoenixKitLocations.Distance provides haversine distance in
    km, mi or m, plus within?/4 and sort_by_distance/3.
    list_locations(near: {lat, lng, radius_km}) returns the locations within
    the radius, nearest first. It uses a bounding-box prefilter that also
    handles poles and the antimeridian.
  • A Structure action on the locations list's card view.

Changed

  • One tab strip per location: Basics, Details, Structure, Settings. The
    Structure page links back to a form panel through ?tab=.
  • Owners are shown by name with a User / Organization marker in the
    list, the picker and the owner card. A managed organization's placeholder
    login address is never shown. The picker searches from one character,
    browses the newest accounts on focus, and pages with "Load more".
  • Country lookup matches codes before names.
  • Saving a space flashes a confirmation.
  • Dependencies updated, phoenix_kit 3.10.0 among them.

Fixed

  • Core's orphan cleanup trashed plain attachments (floor plans,
    brochures) in a location's or a space's files folder. file_references/0
    now counts every file in, or linked into, those folders.
  • A late duplicate create_space submit after the add form closed is ignored.
  • A form tab event with an unknown tab is ignored instead of crashing the
    LiveView.