0.1.5 (2026-05-22)
Fixed
Migrations.ConsentLogsnow implements the versioned-migration protocol PhoenixKit Core v1.7.119 (schema V121) expects —current_version/0andmigrated_version_runtime/1— andup/1/down/1accept the keyword list Core passes (prefix:,version:) as well as the legacy map. Previously, on a clean install against the new Core,mix phoenix_kit.updatesilently skipped the Legal migration andphoenix_kit_consent_logswas never created (existing installs were unaffected). (#8)
Changed
- Translated the
ConsentLogsmigration's docstrings and comments to English (no logic or SQL change)
0.1.4 (2026-05-09)
Changed
- All module-owned
gettextcalls now resolve throughPhoenixKit.Modules.Legal.Gettextinstead of the parent app'sPhoenixKitWeb.Gettext— completes the per-module-i18n migration started in 0.1.3 (legal.ex,web/cookie_consent.ex,web/settings.ex) translate_title/2resolves page titles against the module's own catalogue underpriv/gettext/, so generated legal pages get titles in the user's locale even on parent apps that don't translate these strings themselvespriv/gettext/default.potis now auto-extracted (mix gettext.extract --merge) — covers tab labels, page titles, consent-widget UI, and admin flash messages (126 msgids);__extract_strings__/0seeds runtime-only strings for the extractor
Added
- Russian (
ru) and Estonian (et) translations for the entire catalogue: consent-widget banner / modal / category names, page titles, settings labels, flash messages Plural-Formsheader onpriv/gettext/en/LC_MESSAGES/default.po- Per-locale tests for the module's own catalogue (
translate/2smoke tests covering page titles + consent-widget strings) — runnable against anyphoenix_kitrelease; tab-label tests remain gated behind:requires_phoenix_kit_i18n_apiuntil BeamLabEU/phoenix_kit#522 ships
Notes
- Sidebar tab label still falls back to the raw "Legal" string on
phoenix_kit≤ 1.7.105:Tab.localized_label/1and thegettext_backend:field on%Tab{}ship with phoenix_kit#522, which is unmerged. Consent-widget strings and page titles already resolve per-locale on the publishedphoenix_kitbecause they're rendered live from our own modules.
0.1.3 (2026-04-30)
Added
mix phoenix_kit_legal.installtask — auto-patches host app'sendpoint.ex(Plug.Static),assets/css/app.css(Tailwind@source), andassets/js/app.js(consent IIFE import); idempotentmigration_module/0callback returningPhoenixKit.Modules.Legal.Migrations.ConsentLogs— migration runs viamix phoenix_kit.update- i18n:
Legal.get_consent_widget_config/0returns atranslationsmap (banner / modal / categories); JS reads viat()/tc()helpers with English fallbacks - Legal page titles translated at generation time via
Gettext.with_locale/3so per-language Publishing slots receive the title in the right language - New
phoenix_kit_current_scopeattr oncookie_consent/1— component decides server-side whether to render for authenticated users
Changed
- Server-side auth gate for cookie consent widget:
cookie_consent/1now returns~H""for authenticated users whenhide_for_authenticated?is true, eliminating the client-side flash and the auth round-trip - Default for
legal_hide_for_authenticatedflipped fromfalsetotrue— existing installs that want the widget visible to authenticated users must set this explicitly in Admin → Legal /api/consent-configcache header changed frompublic, max-age=60toprivate, max-age=60(translations are locale-dependent)- Locale prefix dropped from widget links (
/en/legal→/legal) so the parent app's locale plug picks the user's current locale on click css_sources/0returns[:phoenix_kit_legal, @source_root]— absolute source root included for path-dep installs
Removed
should_show,is_authenticated,hide_for_authenticatedfields from/api/consent-configJSON response — auth-gating is now server-side onlyresetGoogleConsentModeJS helper — over-broad heuristic, removed
Fixed
- Banner and modal no longer hidden by Tailwind's
hiddenclass!important - Consent widget initializes reliably from
DOMContentLoadedoutside LiveView scope - Server-rendered consent HTML preserved (no JS re-injection layout flicker)
- HTML escaping (
escapeAttr/escapeText) applied to user-controlled URLs and translation strings in the JS injection path - Component accepts
cookie_policy_url/privacy_policy_url/legal_linksagain as no-op attrs for backward compatibility with PhoenixKit default layouts
Internal
- Test infrastructure:
test_helper.exsstartsPhoenixKit.Cache.Registryand:settingscache for component tests - Credo
--strictclean (resolved 5 nested-module references in tests, 1 single-branchcond, 1 deeply-nested function) - Dialyzer clean (
:mixadded toplt_add_apps)
Migration notes
- Recommended (not required): add
phoenix_kit_current_scope={@phoenix_kit_current_scope}to your<.cookie_consent ...>call so the "Hide for authenticated users" admin setting takes effect. Without it the widget renders for everyone.
0.1.2 (2026-04-05)
- Fix Legal settings route 404 by adding missing
live_viewfield to settings tab definition - Add
version/0callback to display actual package version on modules page - Add
elixirc_options: [ignore_module_conflict: true]for umbrella compatibility - Update dependencies to latest versions
0.1.1 (2026-04-02)
- Migrate select elements to daisyUI 5 label wrapper pattern
- Remove deprecated
select-borderedclass for daisyUI 5 compatibility - Add
live_viewto settings tab for auto route discovery - Add
css_sources/0callback - Fix legal page generation for existing/trashed posts
0.1.0 (2026-03-27)
- Initial extraction from PhoenixKit core
- Legal page generation (Privacy Policy, Cookie Policy, Terms of Service, etc.)
- Cookie consent widget with Google Consent Mode v2
- GDPR, CCPA, LGPD, PIPEDA compliance frameworks
- Consent logging schema