Skip to content

PhoenixKit 1.7.114: The address alone decides the language

PhoenixKit 1.7.114 takes the language only from the page address. Visiting one page with a language prefix no longer pins that language onto every later page without a prefix.

The language stored in the session and a user’s saved preferred language are no longer used for routing. Admin pages for the primary language now drop the language prefix, as public pages do; prefixed admin links still work. Switching language now stays in the open LiveView connection instead of reloading the whole page.

Row menus in tables now open in the right place inside dialogs, and no longer leave a second copy behind when the row updates. Publishing routes work when PhoenixKit is mounted under a path other than the root.

Upgrading

User.preferred_locale_changeset/2 and User.get_preferred_locale/1 are removed, and DialectMapper.resolve_dialect/2 is now resolve_dialect/1. Code that called them needs changing.

Full release notes: PhoenixKit 1.7.114

1.7.114 · 19 May 2026

Added

  • module_assigns attribute on LayoutWrapper.app_layout — a single map whose keys are merged into the assigns passed to a host’s parent layout, letting feature modules thread arbitrary host-consumable data (e.g. phoenix_kit_publishing_translations) across the layout boundary without core having to declare each key (PR #551).

Changed

  • Locale resolution is now URL-authoritative. The phoenix_kit_locale_base session value and user.custom_fields["preferred_locale"] are no longer read for routing — the URL’s locale segment (or its absence) is the only source of truth across both the LiveView mount and the HTTP plug. Fixes a sticky-locale bug where visiting one locale-prefixed URL pinned that locale onto every later prefixless URL (PR #551).
  • Admin URLs drop the locale segment for the primary language, matching non-admin behaviour. Both /<prefix>/admin/* and /<prefix>/:locale/admin/* remain routable, so legacy prefixed links keep working (PR #551).
  • Admin, public, and authenticated-dashboard LiveView routes are each served from a single unified live_session (:phoenix_kit_admin, :phoenix_kit_public, :phoenix_kit_authenticated) spanning both the primary-language (/<prefix>/...) and locale-prefixed (/<prefix>/:locale/...) URL shapes. Switching locale now stays on the WebSocket via push_navigate instead of forcing a full-page reload — previously each surface was split across two sessions and every locale change crossed a live_session boundary.
  • DialectMapper.resolve_dialect/2 collapsed to resolve_dialect/1: dialect resolution is URL-driven and no longer consults a user’s custom_fields["preferred_locale"]. Removed the now-unused User.preferred_locale_changeset/2 and User.get_preferred_locale/1.

Fixed

  • Table RowMenu dropdown is portaled to <body> while open so its position: fixed coordinates escape any <dialog> or transform/contain containing block — previously the menu could render far off-screen inside modals (PR #551). It also no longer leaves a duplicate menu element behind when a server-side LiveView update re-renders the row while the menu is open.
  • Publishing route dispatch threads the workspace url_prefix, so it keeps working when PhoenixKit is mounted under a non-root path (PR #551).

PhoenixKit 1.7.114. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.