phoenix_live_view changelog


Here's the latest and greatest from our changelog! Let's dive into what's new, improved, and fixed. 🚀

Improvements

Enhanced Link Documentation 📚 We've spruced up the docs for link generation in the Phoenix framework. Now, it's crystal clear how to use patch, navigate, and href attributes in the Phoenix.Component module. Whether you're updating a LiveView without a full reload, transitioning between LiveViews, or simply navigating like a traditional anchor tag, we've got you covered. This update ensures a smoother developer experience by clarifying the nuances of navigating across different LiveViews and sessions.

Changelog Update 📝 Our CHANGELOG.md got a facelift to include recent enhancements and bug fixes. Highlights:

  • More informative error messages for invalid targets with JS.dispatch/2.
  • Bug fixes for stream items reapplying JS commands after a disconnect, unnecessary remounts during navigation, and character composition mode in Safari.
  • A fix for a rare socket redirection error and an upstream morphdom issue.
  • Deprecation notice: name attribute of Phoenix.Component.dynamic_tag/1 will be replaced with tag_name.

Morphdom Bump 🔄 We've bumped the morphdom dependency to version 2.7.4. This update includes:

  • indexTree call after beforeUpdateResult.
  • Enhanced element morphing based on streamComponentRestore.
  • Improved error handling for custom events outside form elements. These changes ensure our LiveView components are more robust and functional.

Bugfix

Typo Fix 🔍 Corrected a tiny typo in the CHANGELOG.md file. "Unexpeted" is now "unexpected." Because even the little things matter!

Included Commits

2024-07-19T13:15:42 See commit

This commit updates the morphdom dependency from version 2.7.3 to 2.7.4 in both package.json and package-lock.json, ensuring that the latest features and fixes from the library are included in the project. The change is reflected in the dependency management files, which also show the corresponding updates to the integrity hashes for the new version.

In addition to the dependency update, several modifications were made to the phoenix_live_view JavaScript files. Notable changes include adding an indexTree call after obtaining a beforeUpdateResult, adjustments to how elements are morphed based on streamComponentRestore, and enhancements to error handling for custom events dispatched outside of form elements. These updates aim to improve the functionality and robustness of the LiveView components within the application.

Files changed

  • assets/package-lock.json
  • assets/package.json
  • priv/static/phoenix_live_view.cjs.js
  • priv/static/phoenix_live_view.cjs.js.map
  • priv/static/phoenix_live_view.esm.js
  • priv/static/phoenix_live_view.esm.js.map
  • priv/static/phoenix_live_view.js
  • priv/static/phoenix_live_view.min.js
2024-07-19T14:06:23 See commit

This commit updates the CHANGELOG.md file to reflect various enhancements and bug fixes made in the software. Notable improvements include a more informative error message for invalid targets when using JS.dispatch/2 with input events. The bug fixes address several issues, such as ensuring stream items properly reapply JS commands after a disconnect, resolving unnecessary remounts during navigation, and correcting character composition mode in Safari. Additionally, it fixes a rare error related to socket redirection and an upstream issue with morphdom that affected DOM element handling.

The commit also includes a deprecation notice regarding the name attribute of Phoenix.Component.dynamic_tag/1, which will now be replaced with tag_name. Overall, the changes aim to enhance user experience and stability by addressing previous bugs and providing clearer error messaging.

Files changed

  • CHANGELOG.md
2024-07-19T23:39:57 See commit

The recent commit enhances the documentation for link generation in the Phoenix framework, specifically within the Phoenix.Component module. It clarifies the usage of three key attributes: patch, navigate, and href. The documentation now explicitly describes how each attribute functions: patch allows for updating the current LiveView without a full page reload, navigate transitions to a new LiveView while maintaining the current browser page, and href enables traditional browser navigation akin to standard anchor tags.

Additionally, the commit refines the explanation of the navigate attribute, emphasizing that it facilitates transitions between LiveViews while adhering to routing constraints. The updates ensure that developers have a clearer understanding of how to implement these features effectively, particularly regarding the limitations and behaviors when navigating across different LiveViews and sessions. Overall, these improvements aim to enhance developer experience and reduce confusion when working with Phoenix's navigation capabilities.

Files changed

  • lib/phoenix_component.ex
2024-07-20T14:49:27 See commit

This commit addresses a minor typographical error in the CHANGELOG.md file of the project. Specifically, it corrects the word "unexpeted" to "unexpected" in the section detailing bug fixes for the 0.20.5 release.

The change involves a single addition and deletion, along with two modifications to ensure clarity and accuracy in the documentation. Such corrections are essential for maintaining professionalism and precision in project documentation.

Files changed

  • CHANGELOG.md