Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency phoenix_live_view to ~> 0.20.0 #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 9, 2025

This PR contains the following updates:

Package Update Change
phoenix_live_view (source) minor ~> 0.17.5 -> ~> 0.20.0

Release Notes

phoenixframework/phoenix_live_view (phoenix_live_view)

v0.20.17

Compare Source

v0.20.16

Compare Source

Bug fixes
  • Fix bug introduced in 0.20.15 causing incorrect patching on form elements when awaiting acknowledgements

v0.20.15

Compare Source

Enhancements
  • Warn when rendering an input named "id"
  • Warn on mismatched client and server versions
  • Allow form recovery to work on forms in nested LiveViews
  • Allow using form/3 with inputs outside the form
  • Allow setting page title to an empty string
  • Fix warnings on Elixir 1.17
Bug fixes
  • Fix attributes of existing stream items not being updated on reset
  • Fix nested LiveView within streams becoming empty when reset
  • Fix phx-mounted firing twice, first on dead render, then on live render, leading to errors when a LiveComponent has not yet mounted
  • Fix JS.toggle_class error when used with a transition
  • Fix phx-debounce=blur incorrectly sending change event to the next page in some circumstances
  • Fix race condition when destroying Live Components while transitions are still running
  • Fix page reload when disconnecting LiveSocket if using Bandit
  • Fix formatter changing <% to <%= when it shouldn't
  • Fix updated form values not being sent in some circumstances when phx-trigger-action is used
  • Fix phx-viewport bindings when html or body element has overflow property
Deprecations
  • Deprecate live_flash in favor of Phoenix.Flash.get
  • Deprecate push_redirect in favor of push_navigate
Removal of previously deprecated functionality
  • phx-capture-click has been removed (deprecated in 0.17.0)
  • live_component/2 and live_component/3 helpers (not the function component) have been removed

v0.20.14

Compare Source

Bug fixes
  • Fix warning caused by optional Floki dependency

v0.20.13

Compare Source

Bug fixes
  • Fix LiveComponent rendering bug causing elements to disappear when a LiveComponent child is removed and added back by the server
Enhancements
  • Warn when accessing the socket in a function passed to assign_async / start_async

v0.20.12

Compare Source

Enhancements
  • Phoenix LiveView requires Elixir v1.13+
Bug fixes
  • Do not send Telemetry metadata as Logger event, this avoids the metadata from being accidentally copied to other processes
  • Ensure LiveViewTest does not crash on IDs with foreign characters, such as question marks
  • Fix a bug where LiveViewTest could not perform a connected mount on a page with certain streams

v0.20.11

Compare Source

Bug fixes
  • Fix auto uploads with invalid entries incorrectly proceeding with a form submit instead of halting, causing entries in progress errors
  • Fix auto upload entries failing to be uploaded on submit after moving into a valid state, such as falling within max_entries
  • Fix TagEngine clause warning

v0.20.10

Compare Source

Bug fixes
  • Fix cancelled uploads being re-added
  • Fix form submits for previously submitted invalid upload entries causing errors instead of preflighted new upload entries
  • Fix HTML formatter not respecting phx-no-format for script tags
Enhancements
  • Add additional HEEx debug annotations for the caller locations of function component invocations
  • Abandon form recovery if recovery event fails

v0.20.9

Compare Source

Bug fixes
  • Fix error in LiveViewTest when a phx-update="ignore" container is added dynamically to the DOM

v0.20.8

Compare Source

Bug fixes
  • Fix live uploader issue when a form contained more than one <.live_file_input>
  • Fix phx-remove on re-added stream items trigging the remove when it should not
  • Fix js error attempting to re-order an element that does not exist in the DOM
Enhancements
  • Align LiveViewTest with JavaScript DOM patching behavior for phx-update="ignore" when updating attributes in LiveViewTest

v0.20.7

Compare Source

Bug fixes
  • Fix phx-skip containers leaking into DOM on first patch in some cases (#​3117)
  • Fix phx-feedback-for failing to be properly updated in some cases (#​3122)

v0.20.6

Compare Source

Bug fixes
  • Fix stream items being excluded in LiveViewTest
  • Fix stream items failing to properly update nested streams or LiveComponents
  • Fix debounce/blur regression causing unexpected events to be sent

v0.20.5

Compare Source

Deprecations
  • Deprecate phx-feedback-group introduced in the previous release, the goal is to move feedback handling into Elixir and out of the DOM
Bug fixes
  • Fix blur event on phx-debounce being dispatched incorrectly
  • Fix open_browser not working on WSL for project under UNIX file systems
  • Match browser stream insert ordering behavior in LiveViewTest
  • Fix phx-click-away not working when element is partially hidden
  • Fix phx-feedback-for classes not being applied in some cases
  • Fix form submitter failing to be sent as key/value pair in some cases
  • Fix null form reference causing errors on some DOM patches

v0.20.4

Compare Source

Bug fixes
  • Fix phx-remove on sticky LiveViews
  • Fix phx-disabled-with not restoring button disabled state on empty diff acknowledgement
  • Fix stream reset not ordering items correctly
  • Send {:shutdown, :cancel} to handle_async/3 on cancel_async
  • Prevent events from child LiveViews from bubbling up to root LiveView when child is not mounted yet
  • Fix phx-mounted being called twice for stream items
  • Never move existing stream items if they already exist (use stream_delete and then stream_insert instead)
  • Fix live component rendering breaking when the server adds a component back that was pruned by the client (#​3026)
  • Allow redirect from upload progress callback
  • Fix nested components getting skipped when resetting a stream
  • Fix nested components getting skipped in LiveComponents
  • Fix stream limits not being applied correctly when bulk inserting
  • Fix click-away being called incorrectly on form submits
  • Fix inconsistencies between LiveViewTest and browser stream implementations
  • Fix phx-feedback-for being reapplied when there are multiple inputs with the same name
  • Ensure phx-update="ignore" behaves consistently: updates from the server to the element's content and attributes are ignored, except for data attributes
Enhancements
  • Add JS.toggle_class
  • Add JS.toggle_attribute
  • Force update select options when the options changed from the server while a select has focus
  • Introduce phx-feedback-group for handling feedback for composite input groups
  • Add validate_attrs to slots
  • Support phx-viewport bindings in scrollable containers
  • Perform client redirect when trying to live nav from dead client to avoid extra round trip
  • Allow regular buttons with name/value attributes to send form events and adjusted dynamic form documentation to reflect this
  • Allow form attribute on live_file_input
Removal of previously deprecated functionality
  • live_component/2 and live_component/3 helpers (not the function component) have been removed

v0.20.3

Compare Source

Bug fixes
  • Fix phx-viewport bindings failing to fire after navigation
  • Preserve order of appended items in stream in LiveViewTest
  • Fix order of items on client when resetting a stream to existing set of items
Enhancements
  • Support JS.push from dead views

v0.20.2

Compare Source

Bug fixes
  • Fix JavaScript error when submitting a form that has in progress uploads
  • Fix JS command :target failing to work when used as phx-submit or phx-change with a selector-based target
  • Fix JS.focus() failing to focus negative tabindex
  • Fix LiveViewTest failing to remove items after stream reset
  • Fix phx-window-blur and phx-window-focus events not firing
  • Fix SVG anchor links throwing errors when clicked
Enhancements
  • Speed up DOM patching performance 3-30x 🔥
  • Support handle_async lifecycle callback
  • Extend visibility checks for phx-click-away to better handle whether an element is visible in the viewport or not
  • Allow JS.patch and JS.navigate to be tested with render_click
  • Support :supervisor option to assign_async and start_async
Deprecations
  • Deprecate phx-update="append" and phx-update="prepend" in favor of phx-update="stream"

v0.20.1

Compare Source

Bug fixes
  • Fix bug introduced in 0.20.15 causing incorrect patching on form elements when awaiting acknowledgements

v0.20.0

Compare Source

Deprecations
  • Deprecate the ~L sigil in favor of ~H
  • Deprecate preload/1 in LiveComponent in favor of update_many/1
  • Deprecate live_component/2-3 in favor of <.live_component />
  • Deprecate live_patch in favor of <.link patch={...} />
  • Deprecate live_redirect in favor of <.link navigate={...} />
  • Deprecate live_title_tag in favor of <.live_title />
Backwards incompatible changes
  • Remove previously deprecated render_block/2 in favor of render_slot/2
  • Remove previously deprecated live_img_preview/2 in favor of <.live_img_preview />
  • Remove previously deprecated live_file_input/2 in favor of <.live_file_input />
Bug fixes
  • Fix uploads with auto_upload: true failing to propagate errors when any individual entry is invalid
  • Fix uploads with auto_upload: true failing to auto upload valid entries errors when any individual entry is invalid
  • Fix error on form recovery with auto_upload: true
  • Fix issue on form recovery where hidden inputs would be selected by mistake
  • Fix form recovery when phx-change is a JS command
  • Fix stream reset on nested live components with nested streams
  • Fix window location resetting to null when using nested LiveView on connection error
  • Fix anchors within contenteditable causing LiveSocket disconnects
Enhancements
  • Add heex debug annotations via config :phoenix_live_view, debug_heex_annotations: true, which provides special HTML comments that wrap around rendered components to help you identify where markup in your HTML document is rendered within your function component tree
  • Add assign_async, start_async, <.async_result> and, AsyncResult for declaratively handling async operations in a LiveView or LiveComponent.
  • Supporting passing @myself for Phoenix.LiveView.send_update/3
  • Support change tracking on Access.get
  • Allow overriding id of <.live_img_preview>

v0.19.5

Compare Source

Backwards incompatible changes
  • The close/1 callback of Phoenix.LiveView.UploadWriter is now close/2 with the close reason passed as the second argument.
  • The write_chunk callback of Phoenix.LiveView.UploadWriter must now return the updated
    writer state when an error occurs. Instead of {:error, reason}, return {:error, reason, new_state}.
Enhancements
  • Pass close reason to Phoenix.LiveView.UploadWriter close.
  • Dispatch phx:navigate window events when LiveView changes the history state
Bug fixes
  • Call Phoenix.LiveView.UploadWriter close callback when LiveView goes down or connection is lost
  • Fix JS.patch to a Phoenix router scope with :host causing errors
  • Fix immediate navigation after patch not updating URL
  • Fix stream reset on nested streams inside live components causing nested stream children to be removed

v0.19.4

Compare Source

Enhancements
  • Introduce Phoenix.LiveView.UploadWriter

v0.19.3

Compare Source

Bug fixes
  • Fix push_event inside component update not being sent in some cases
  • Bring back accidentally deprecated upload_errors/1

v0.19.2

Compare Source

Bug fixes
  • Fix issue when <input name="value" /> is used

v0.19.1

Compare Source

Enhancements
  • Allow accept attribute on <.live_file_input> to override default values
Bug fixes
  • Fix issue causing anchor clicks to disconnect LV when they were already handled via preventDefault() by other scripts

v0.19.0

Compare Source

Backwards incompatible changes
  • Drop support for passing an id to the phx-feedback-for attribute. An input name must be passed instead.
  • Remove previously deprecated let attribute. Use :let instead
  • Remove previously deprecated <%= live_img_preview(entry) %>. Use <.live_img_preview entry={entry} /> instead
  • Remove previously deprecated <%= live_file_input(upload) %>. Use <.live_file_input upload={upload} /> instead
  • Remove previously deprecated <%= live_component(Component) %>. Use <.live_component module={Component} id=\"hello\" /> instead
  • Don't convert underscores to dashes automatically when rendering HTML attributes. Use dashes or underscores where appropriate instead.
Enhancements
  • Support stream resets with bulk insert operations
  • Support ordered inputs within inputs_for, to pair with Ecto's new sort_param and drop_param casting
  • Send form phx-value's on form events
Deprecations
  • Deprecate passing :dom_id to stream/4 in favor of stream_configure/3
  • Deprecate render_block/2 in favor of render_slot/2
  • Deprecate <%= live_img_preview(entry, opts) %>. Use <.live_img_preview entry={entry} {opts} />
  • Deprecate <%= live_file_input(upload, opts) %>. Use <.live_file_input upload={upload} {opts} />
  • Deprecate stateless LiveComponent in favor of function components or in favor of <.live_component id={...} /> (note the id is required)
Bug fixes
  • Fix LiveView disconnects when clicking a download link
  • Fix stream deletes not being sent on nested for comprehensions
  • Fix phx-disconnected bindings not firing on mount failures
  • Support form recovery on forms with only hidden inputs

v0.18.18

Compare Source

Bug fixes
  • Allow :live_action to be assigned in a component
  • Only filter internal function component attributes in assigns_to_attributes
  • Only include submitter with name
Enhancements
  • Add JS.exec command for executing commands defined on other element attributes

v0.18.17

Compare Source

Bug Fixes
  • Fix callbacks like handle_info failing to be invoked in development after a code change with the Phoenix code reloader
Enhancements
  • Support submitter on form submit events.
  • Avoid compile-time dependency for attr when referencing structs
  • Validate reserved assigns. Attempting to assign :uploads, :streams, :live_action, :socket, :myself will now raise in LiveView and LiveComponent

v0.18.16

Compare Source

Enhancements
  • Support streams in Live Components
  • Optimize plug error translation when a Plug.Exception is raised over connected LiveView
Bug Fixes
  • Fix formatter issues when there are multiple HTML comments

v0.18.15

Compare Source

Bug Fixes
  • Fix JS.transition applying incorrect classes
Enhancements
  • Reset phx-feedback-for errors on type="reset" inputs and buttons

v0.18.14

Compare Source

Bug Fixes
  • Fix LiveViewTest failing to find main live view

v0.18.13

Compare Source

Enhancements
  • Improve error message when failing to use Phoenix.Component

v0.18.12

Compare Source

Enhancements
  • Introduce streams for efficiently handling large collections
  • Allow replies from :handle_event lifecycle hooks
  • Add <.inputs_for> component to Phoenix.Component
  • Support replies on lifecycle :handle_event hooks
Bug Fixes
  • Fix change tracking when re-assigning a defaulted attribute to same default value
  • Fix upload drag and drop failing to worka after using file select dialog
  • Fix form recovery when form's first input is phx-change

v0.18.11

Compare Source

Bug Fixes
  • Fix socket unloading connection for forms that have defaulted prevented

v0.18.10

Compare Source

Bug Fixes
  • Fix svg tags with href incorrectly unloading socket on click
  • Fix form submits with target="_blank" incorrectly unloading socket on submit

v0.18.9

Compare Source

Bug Fixes
  • Fix regular form submits failing to be dispatched

v0.18.8

Compare Source

Enhancements
  • Restore scroll position on back when previous navigation was live patch
Bug Fixes
  • Fix live layout not being applied until connected render

v0.18.7

Compare Source

Bug Fixes
  • Fix live layout not being applied when passed to :live_session during disconnect render
  • Fix external anchor clicks and links with hashes incorrectly unloading socket

v0.18.6

Compare Source

Bug Fixes
  • Fix external anchor click unloading on external click

v0.18.5

Compare Source

Bug Fixes
  • Fix external anchor click unloading socket

v0.18.4

Compare Source

Enhancements
  • Support string upload name to support dynamically generated allow_upload's
Bug Fixes
  • Fix nested LiveView race condition on live patch causing nested child to skip updates in some cases
  • Fix browser history showing incorrect title when using live navigation with @page_title
  • Fix undefined _target param when using JS.push for form changes
  • Fix phx-no-feedback missing from inputs added after a form submit
  • Fix phx-disconnected events firing when navigating away or submitting external forms

v0.18.3

Compare Source

Enhancements
  • Add embed_templates to Phoenix.Component for embedding template files as function components
  • Raise on global slot attributes
Bug Fixes
  • Fix bug on slots when passing multiple slot entries with mix if/for syntax

v0.18.2

Compare Source

Bug Fixes
  • Fix match error when defining :values before :default
  • Allow tuples in external redirects
  • Fix race condition on dispatching click away when enter is pressed
  • Fix formatter breaking inline blocks when surrounded by text without whitespace
Enhancements
  • Add intersperse component for rendering a separator between an enumerable

v0.18.1

Compare Source

Bug fixes
  • Allow :live_action to be assigned in a component
  • Only filter internal function component attributes in assigns_to_attributes
  • Only include submitter with name
Enhancements
  • Add JS.exec command for executing commands defined on other element attributes

v0.18.0

Compare Source

LiveView v0.18 includes a major new feature in the form of declarative assigns with new attr
and slot 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's
link have been replaced by a unified Phoenix.Component.link/1 function component:

<.link href="https://myapp.com">my app</.link>
<.link navigate={@&#8203;path}>remount</.link>
<.link patch={@&#8203;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 must import Phoenix.Component where you previously imported Phoenix.LiveView.Helpers
when upgrading. You may also need to import Phoenix.Component where you also imported Phoenix.LiveView and some of its functions have been moved to Phoenix.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 of Phoenix.Component
  • live_patch - deprecate in favor of new <.link patch={..}> component of Phoenix.Component
  • push_redirect - deprecate in favor of new push_navigate function on Phoenix.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 support let 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, and pop_focus for accessibility
  • [Socket] Support sharing Phoenix.LiveView.Socket with regular channels via use Phoenix.LiveView.Socket
  • Add _live_referer connect param for handling push_navigate referral URL
  • Add new phx-connected and phx-disconnected bindings for reacting to lifecycle changes
  • Add dead view support for JS commands
  • Add dead view support for hooks
Bug fixes
  • Fix external upload issue where listeners are not cleaned up when an external failure happens on the client
  • Do not debounce phx-blur

v0.17.14

Compare Source

v0.17.13

Compare Source

v0.17.12

Compare Source

Enhancements
  • Add support for upcoming Phoenix 1.7 flash interface

v0.17.11

Compare Source

Enhancements
  • Add replaceTransport to LiveSocket
Bug fixes
  • Cancel debounced events from firing after a live navigation event
  • Fix hash anchor failing to scroll to anchor element on live navigation
  • Do not debounce phx-blur events

v0.17.10

Compare Source

Bug fixes
  • [Formatter] Preserve single quote delimiter on attrs
  • [Formatter] Do not format inline elements surrounded by texts without whitespaces
  • [Formatter] Keep text and eex along when there isn't a whitespace
  • [Formatter] Fix intentional line breaks after eex expressions
  • [Formatter] Handle self close tags as inline
  • [Formatter] Do not format inline elements without whitespaces among them
  • [Formatter] Do not format when attr contenteditable is present
Enhancements
  • [Formatter] Introduce special attr phx-no-format to skip formatting

v0.17.9

Compare Source

Bug fixes
  • Fix sticky LiveViews failing to be patched during live navigation
  • Do not raise on dynamic phx-update value

v0.17.8

Compare Source

Enhancements
  • Add HEEx formatter
  • Support phx-change on individual inputs
  • Dispatch MouseEvent on client
  • Add :bubbles option to JS.dispatch to control event bubbling
  • Expose underlying liveSocket instance on hooks
  • Enable client debug by default on localhost
Bug fixes
  • Fix hook and sticky LiveView issues caused by back-to-back live redirects from mount
  • Fix hook destroyed callback failing to be invoked for children of phx-remove in some cases
  • Do not failsafe reload the page on push timeout if disconnected
  • Do not bubble navigation click events to regular phx-click's
  • No longer generate csrf_token for forms without action, reducing the payload during phx-change/phx-submit events

v0.17.7

Compare Source

Enhancements
  • Optimize nested for comprehension diffs
Bug fixes
  • Fix error when live_redirect links are clicked when not connected in certain cases

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Jan 9, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: mix.lock
Command failed: mix deps.update phoenix_live_view
** (Mix) Hex dependency resolution failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants