phoenix_live_view changelog


Hey there, code adventurers! We've got a bunch of cool updates and fixes that will make your coding journey smoother and more fun. Check out the latest changes below! ๐Ÿš€

  • New feature: Improved Error Messaging on Form Submission
    We've fine-tuned the error handling in the put_submitter function. Now, when you hit a snag with form submissions, you'll get more accurate and helpful error messages. Whether it's a missing submitter or an invalid one, you'll know exactly what's up. Say goodbye to vague error messages and hello to clarity! ๐ŸŽ‰

  • Bugfix: Navigation Failures Now Logged
    Ever had a navigation fail and wondered why? We've got you covered! Now, when navigation events run into trouble, the system logs a warning with the reason. Whether it's a cross-session redirect or a mismatched URL, you'll know why it's falling back to a full page reload. This update also refines navigation guidelines, making your LiveView experience even better. ๐Ÿงญ

  • Changelog Update: Fresh Enhancements and Fixes
    Our changelog just got a facelift! We've rolled out a bunch of bug fixes and enhancements. From fixing live uploads and input focus issues to adding new testing capabilities and improving comment formatting, there's a lot to love. Plus, there's a new warning log for push_navigate fallbacks, ensuring better feedback when things go awry. ๐Ÿ“œ

  • Chore: Tidied Up Example Code
    We cleaned up some example code by removing an unnecessary bracket in a log message. This tiny tweak makes the code easier to read and keeps our standards high. Sometimes, it's the little things that make a big difference! ๐Ÿงน

Keep exploring and happy coding! ๐ŸŒŸ

Included Commits

2024-11-23T17:39:52 See commit

This commit addresses an issue related to error messaging in the put_submitter function within the Phoenix.LiveViewTest.ClientProxy module. Specifically, it modifies how errors are handled when the form submitter is not present. The code now distinguishes between different error types, ensuring that a more accurate and informative error message is returned depending on the nature of the error encountered.

Key changes include the addition of a new error case for when there is no submitter ({:error, :none, _}) and a refinement of the existing error handling logic. The updated implementation ensures that if the form lacks a submitter, it checks the inputs accordingly, while also providing clearer messages for invalid submitters based on specific error conditions. This enhancement improves the overall robustness and user experience of the form submission process in the application.

Files changed

  • lib/phoenix_live_view/test/client_proxy.ex
2024-11-23T23:05:06 See commit

This commit introduces logging functionality to enhance the error handling of navigation failures within the Phoenix LiveView framework. Specifically, it modifies the authorize_session function in the Phoenix.LiveView.Channel module to log warnings when navigation events fail. The logs provide clear messages indicating the reasons for the failures, such as attempting to redirect across live sessions or navigating to a URL that does not correspond to a LiveView. In both cases, the system will revert to a full page reload instead of a live navigation.

Additionally, the commit makes minor adjustments to the documentation in the Phoenix.LiveView module, clarifying that push_navigate/2 should only be used for navigation within the same live_session, while redirect/2 should be used for other cases. The changes also include a refinement in the Phoenix.LiveView.Session module, where the error handling is simplified. Overall, these updates aim to improve the developer experience by providing more informative logging and clearer navigation guidelines.

Files changed

  • lib/phoenix_live_view.ex
  • lib/phoenix_live_view/channel.ex
  • lib/phoenix_live_view/session.ex
2024-11-27T12:17:03 See commit

The recent commit updates the changelog for the project, specifically modifying the version from 1.0.0 to 1.0.0-rc.8. It includes a series of bug fixes and enhancements aimed at improving the functionality and user experience of the application. Notable fixes address issues related to live uploads, input focus loss during updates, and navigation problems with the browser's back and forward buttons. Additional fixes enhance the handling of form submissions and live sessions, ensuring a smoother interaction with the application.

In terms of enhancements, the update introduces support for the default attribute in the <.live_title> component, adds new testing capabilities with refute_push_event, and improves comment formatting. The commit also includes a warning log for instances where push_navigate falls back to a full page reload, indicating a focus on better error handling and user feedback. Overall, this changelog update reflects a commitment to refining the application's performance and addressing user-reported issues.

Files changed

  • CHANGELOG.md
2024-11-27T20:39:29 See commit

This commit addresses a minor formatting issue in the example code of the Phoenix.LiveView.UploadWriter module by removing an unnecessary bracket from a log message. Specifically, it modifies the close function to correct the syntax in the logging statement, ensuring that the message is properly formatted when closing an upload.

The changes involve one addition and one deletion, resulting in a cleaner and more accurate log output. This small adjustment contributes to better code readability and helps maintain coding standards within the project.

Files changed

  • lib/phoenix_live_view/upload_writer.ex