Bump phoenix_live_view from 0.17.11 to 0.18.1
Bumps phoenix_live_view from 0.17.11 to 0.18.1.
Changelog
Sourced from phoenix_live_view's changelog.
0.18.1 (2022-09-28)
Bug Fixes
- Fix phx-loading class being applied to dead views
- Fix
<.live_upload_preview />
causing invalid attribute errors on uploads- Do not fire phx events when element is disabled
Enhancements
- Support
:include
option to extend global attributes on a case-by-case basis- Warn when accessing a variable binding defined outside of
~H
0.18.0 (2022-09-20)
LiveView v0.18 includes a major new feature in the form of declarative assigns with new
attr
andslot
APIs for specifying which attributes a function component supports, the type, and default values. Attributes and slots are compile-time verified and emit warnings (requires Elixir v1.14.0+).v0.18 includes a number of new function components which replace their EEx expression counterparts
<%= ... %>
. For example,live_redirect
,live_patch
, and Phoenix.HTML'slink
have been replaced by a unifiedPhoenix.Component.link/1
function component:<.link href="https://myapp.com">my app</.link> <.link navigate={@path}>remount</.link> <.link patch={@path}>patch</.link>
Those new components live in the
Phoenix.Component
module.Phoenix.LiveView.Helpers
itself has been soft deprecated and all relevant functionality has been migrated. You mustimport Phoenix.Component
where you previously importedPhoenix.LiveView.Helpers
when upgrading. You may also need toimport Phoenix.Component
where you also importedPhoenix.LiveView
and some of its functions have been moved toPhoenix.Component
.Additionally, the special
let
attribute on function components have been deprecated by a:let
usage.Deprecations
live_redirect
- deprecate in favor of new<.link navigate={..}>
component ofPhoenix.Component
live_patch
- deprecate in favor of new<.link patch={..}>
component ofPhoenix.Component
push_redirect
- deprecate in favor of newpush_navigate
function onPhoenix.LiveView
Enhancements
- [Component] Add declarative assigns with compile-time verifications and warnings via
attr
/slot
- [Component] Add new attrs
:let
and:for
, and:if
with HTML tag, function component, and slot support. We still supportlet
but the formatter will convert it to:let
and soon it will be deprecated.- [Component] Add
dynamic_tag
function component- [Component] Add
link
function component- [Component] Add
focus_wrap
function component to wrap focus around content like modals and dialogs for accessibility- [Logger] Add new LiveView logger with telemetry instrumentation for lifecycle events
- [JS] Add new JS commands for
focus
,focus_first
,push_focus
, andpop_focus
for accessibility- [Socket] Support sharing
Phoenix.LiveView.Socket
with regular channels viause Phoenix.LiveView.Socket
- Add
_live_referer
connect param for handlingpush_navigate
referal URL- Add new
phx-connected
andphx-disconnected
bindings for reacting to lifecycle changes- Add dead view support for JS commands
... (truncated)
Commits
-
4620239
Release 0.18.1 -
a01e911
Bump changelog -
f6a09ee
Disabledphx-click
targets with children should not fire click events. (#2127) -
5134e5a
Bump changelog -
5823daa
Warn when using a tainted var (#2236) -
00c21a6
Also change track assigns[key] -
b3469b0
Bump docs -
b4df688
Accept global_prefixes option for LiveComponent (#2231) -
470b56e
Bump changelog -
7646afc
Do not set loading states until channel join. Closes #2211 - Additional commits viewable in compare view