phoenix_live_view changelog


Here's a rundown of the latest changes, improvements, and bug fixes that will make your coding experience smoother and more delightful. Let's dive in! πŸš€

  • Improvement: Keep original structure of __changed__
    We've spruced up the force_assign function to better handle change tracking for nested structures. Now it stores the current value in the changed map only if it's a list or map, preserving the original value. For non-collection types, a default value of true is set, making change tracking a breeze. Tests have been updated to keep everything in sync. 🌟

  • Improvement: Keep values of composite types in __changed__
    Tuples are now part of the gang! We've expanded change tracking to include tuples in the __changed__ map, joining lists and maps. This ensures comprehensive monitoring of changes in composite types, making sure nothing slips through the cracks. πŸŽ‰

  • Improvement: Update changelog
    Our CHANGELOG.md got a makeover! It now includes updates on error messages, slot option validations, and a bunch of bug fixes. From stream items to Safari quirks, we've tackled them all. Plus, there's a heads-up on the deprecation of the name attribute in Phoenix.Component.dynamic_tag/1. Keep your eyes peeled for tag_name! πŸ“

  • Bugfix: Fix typo in attach_hook/4 doc
    We squashed a tiny typo in the attach_hook/4 documentation. Now it reads "you may not be interested in" instead of "on," making the docs grammatically sound. Because every little bit counts! 🐞

  • Bugfix: Fix typo
    Another typo bites the dust! In the force_assign function comments, "tiple" has been corrected to "tuple," ensuring clarity and precision in describing composite types. Code readability is key! πŸ”

Enjoy the enhancements and happy coding! πŸ’»βœ¨


Welcome to the latest update! We've been busy squashing bugs and polishing up features to make your experience smoother and more awesome. Here's a peek at what's been cooking under the hood:

  • Improvement: Clarify Options in LiveViewTest.element 🌟
    We've added some extra sparkle to the element function by clarifying its options. With a new guard clause, is_text_filter, we now ensure that text filters are either a binary string, a Regex struct, or nil. This means the has_element? and element functions are now more explicit and robust, making your testing experience clearer and more reliable. Bye-bye, ambiguity! πŸ‘‹

  • Improvement: Handle Strings with Escaped Quotes πŸ”
    Ever had a string with escaped quotes that just wouldn't behave? We've got you covered! We tinkered with the render_attribute function so it no longer flattens strings with quotes or those fancy heredocs. Now, your strings will stay intact, and the attributes will render just as they should. Plus, we added a new test to make sure everything's shipshape. Cheers to more accurate string handling! 🍻

Thanks for sticking with us! Keep those feature requests and bug reports coming. We love making things better for you! πŸš€


Hey there, awesome devs! We've got some nifty updates and tweaks to make your coding life a bit smoother. Check out the latest changes:


πŸ› οΈ Improvements

Enhanced Documentation for Live Components
We've spruced up the docs for the mount and update callbacks in Phoenix.LiveComponent! Now it's crystal clear that the component’s socket doesn’t inherit the parent's assigns and that changes to it won’t affect the parent LiveView. Plus, we’ve detailed the expected return values for both c:mount/1 and c:update/2. Dive in and get those live components rocking! πŸš€

Refined on_mount Macro to Reduce Compile Dependencies
The on_mount macro just got smarter! We’ve refactored it to handle arguments more flexibly, reducing unnecessary compile-time dependencies. A new private function, expand_literals, ensures that only the essentials are expanded. Your compile times should be a tad quicker now! ⚑️

Clarified JS Transition Durations
We’ve added a shiny new example to the lib/phoenix_live_view/js.ex file. Now, it’s easier to see how a duration-300 CSS class translates to a time: 300 milliseconds in JS transitions. No more guessing gamesβ€”just smooth animations! 🎨


Keep on coding and stay awesome! πŸ’»βœ¨


Hey there, awesome developers! Here's the latest and greatest from our recent commits. We've packed in some handy new features, improvements, and bug fixes to make your coding life even smoother. πŸš€


New feature

  • Validate Slot Options: πŸŽ‰ Now, if you make a typo when defining slot options (like requird instead of required), you'll get a compile-time warning! Only the options :required, :doc, and :validate_attrs are accepted. This nifty feature helps catch errors early and keeps your code clean and robust.

Improvement

  • Enhanced clear_flash/1-2 Docs: πŸ“š We've added info about the lv:clear-flash event to the clear_flash/1 and clear_flash/2 documentation. Now you can see how to clear flash messages on the client side using LiveView, complete with practical examples.

  • Updated Navigation Terminology: πŸ—ΊοΈ All references to 'live_redirect' have been replaced with 'push_navigate' in our docs. This update standardizes terminology and ensures you're up-to-date with the latest naming conventions.

  • Fixed Callback and Function Links: πŸ”— We've corrected several documentation issues, particularly the references to mount/3, now properly noted as c:mount/3. We've also clarified the usage of the attach_hook function, making sure it's clear and accurate.

Bugfix

  • Click Event Targeting: πŸ› We've fixed an issue where the mousedown target was incorrectly used for click events. Now, the actual event target is used, aligning with standard click handling practices. This resolves the inconsistency noted in issue #3363.

That's a wrap for now! Keep coding, keep creating, and stay awesome! πŸ’»βœ¨


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!


Hey there, awesome devs! We've got some cool updates and fixes to share with you. Check out the latest changes below:


Changelog

Bugfix: Keep stream items on rejoin (#3353)

  • Ensures JavaScript commands are properly reapplied when a LiveView reconnects. This fix involves changes to the DOMPatch class in dom_patch.js and updates to the streams.spec.js test file. A new button for hiding elements using JS is also added to the StreamLive module in streams.ex. This addresses the issue of stream items not retaining their JS commands upon rejoining a LiveView, enhancing the user experience. πŸŽ‰

Bugfix: Throw error when dispatching input on invalid targets (#3331)

  • Adds a useful error message when using JS.dispatch to trigger an input event on invalid targets. This fix helps developers by providing clarity and guidance when encountering this issue. The changes are made in the assets/js/phoenix_live_view/live_socket.js file. 🚨

Bugfix: Fix unnecessary remount when navigating back (#3335)

  • Addresses the issue of unnecessary remounting when using the browser back button in Phoenix LiveView. The fix involves using replaceRootHistory when joining the main view, preventing unnecessary remounting. A new test in test/e2e/tests/navigation.spec.js ensures that navigating back works without remounting. πŸ› οΈ

Improvement: Enhance docs of put_flash (#3344)

  • Improves the documentation of the put_flash function, providing more clarity on its usage and functionality within LiveView applications. This enhancement makes it easier for developers to utilize put_flash effectively. πŸ“š

Improvement: mix format (#3340)

  • Includes changes related to formatting code using the mix format tool and adds support for the noformat modifier on sigil_H. The commit also ensures that the code is properly formatted in the CI pipeline and raises an error on invalid sigil_H modifiers. πŸš€

Improvement: Note of a regex for replacing the phx-no-feedback classes (#3346)

  • Introduces a regex for replacing phx-no-feedback classes and mentions filtering errors in the initial function for Phoenix.HTML.FormField. This regex helps in quickly identifying and updating instances of the phx-no-feedback classes in the codebase. πŸ”

Happy coding! 🌟


Hey team! Here are the latest and greatest updates to our project. Dive in and see what's new! πŸš€

Bugfixes

  • Updated Playwright & Fixed Setup: We've upgraded Playwright to v1.45.1, which resolves some setup issues and streamlines the process. Now, npm run setup handles everything for you. Enjoy a smoother ride with clearer instructions! πŸ› οΈ
  • CI Workflow Tweaks: Our CI workflow got a little love too. We've updated Elixir to 1.17.2, OTP to 27.0, and Node.js to 20.x. Plus, we've reverted a previous name change in the e2e CI step. Everything's running like a well-oiled machine now! βš™οΈ

Improvements

  • Enhanced JS Interop Guide: The js-interop.md file got a makeover! We’ve added a more efficient method for pushing out-of-band events using push_event. This update includes shiny new code examples and emphasizes the global nature of these events. Happy coding! πŸ’‘
  • Dependency Updates: We've freshened up our dependencies. Phoenix_live_reload is now "~> 1.4", and we've added phoenix_html_helpers "~> 1.0". Changes in mix.exs, mix.lock, and test/support/live_views/elements.ex ensure everything works seamlessly with these updates. πŸ“¦

Enjoy the new updates and happy coding! 🌟


Hey there, awesome developers! πŸŽ‰ We've got some cool updates and improvements for you. Check out the latest changes:

Changelog

New feature: Use the new :mfa field for route checking

  • We've jazzed up the route checking in Phoenix LiveView by introducing the new :mfa field! πŸš€
  • This new field adds detailed metadata about the live_view, action, and the number of arguments for the mount function.
  • Also, a heads-up: there's a note to remove the :log_module when Phoenix version 1.8 or higher is required.
  • Files touched: lib/phoenix_live_view/router.ex

Improvement: Clarify required id for live_file_input, closes #3330

  • Made it crystal clear that the id attribute for live_file_input cannot be overwritten. πŸ”
  • Added guidance on creating a label with a for attribute pointing to the UploadConfig ref.
  • Provided tips on implementing drag and drop functionality by annotating the droppable container with phx-drop-target.
  • Files touched: lib/phoenix_component.ex

Happy coding! πŸ’»βœ¨


Hey there, awesome devs! Here's the latest and greatest from our codebase updates. Check out what's new, what's fixed, and what's improved. πŸš€

New Features

  • Track Distinct Loading and Lock Refs (#3324): We've introduced changes to track distinct loading and lock references in various JavaScript and Elixir files. This update aims to enhance the performance and reliability of Phoenix Live View applications by providing more efficient handling of loading and lock references. Big thanks to Steffen Deusch for co-authoring this one!

Bugfixes

  • Fix Form Recovery When Targeting LiveComponents (#3317): Addressed an issue with form recovery in LiveComponents caused by a previous change in event dispatching. Now, the check for LiveComponents within the same LiveView works correctly by using the fragment's first child.
  • Format EEx Blocks Within Script Tag (#3312): Made sure that EEx blocks within script tags are formatted correctly. This update ensures that the formatter maintains the expected format.

Improvements

  • Release 1.0.0-rc.5: This release includes updates, bug fixes, and improvements in preparation for the stable release. Files like package.json, mix.exs, and various static files have been updated.
  • Release 1.0.0-rc.4: Focused on enhancing the handling of form elements and select options in the Phoenix LiveView JavaScript client. Bug fixes related to focused inputs and acknowledgements are addressed.
  • Release 1.0.0-rc.6: Includes updates to multiple files to improve functionality, fix bugs, and add new features to the Phoenix Live View component.

Stay tuned for more updates, and happy coding! πŸŽ‰


Hey there, awesome developers! We've got some exciting updates and fixes to share with you. Check out the latest highlights below to see what's new and improved in our project. πŸš€


New Features

  • Release 1.0.0-rc.1: πŸŽ‰ Big milestone alert! We've rolled out version 1.0.0-rc.1, bringing a bunch of updates, bug fixes, and new features. This release marks a significant step towards our full version 1.0.0, enhancing performance and functionality across the board.

Improvements

  • Form Bindings Guide Update: We've updated the 'Form bindings' guide to set the form/changeset action to a conventional name, unrelated to database operations. This change uses the new :action option added in v1.0, aligning the code with best practices and ensuring consistency. πŸ“š

  • Using form/3 with Inputs Inside and Outside the Form: Now you can use form/3 with inputs both inside and outside the form element, addressing issue #3170. This enhancement improves form handling flexibility in Phoenix LiveView applications. πŸ“

Bugfixes

  • Check asyncFilter on Blur: Fixed issue #3194 by ensuring asyncFilter is checked on blur. We've also added an end-to-end test to ensure the event isn't sent to the wrong LiveView when submitting a form with debounce blur. πŸ›

  • Named Form Inputs with put_submitter/2: Resolved the issue with named form inputs and put_submitter/2. Improvements include better handling of named inputs and removing some hacky comparisons. πŸ› οΈ

  • Wait for Transitions Before Determining cids_destroyed: Addressed issue #3139 by waiting for pending transitions to complete before determining if component IDs (cids) should be destroyed. This fix ensures more accurate and reliable cid destruction. ⏳

Changelog Update

  • Changelog Enhancements: We've updated the changelog with several enhancements and bug fixes, including warnings for rendering an input named "id," allowing form recovery in nested LiveViews, and fixing warnings on Elixir 1.17. Also included are fixes for input tracking on checkboxes, resolving race conditions, and addressing page reload issues when disconnecting LiveSocket with Bandit. πŸ“œ

We hope these updates make your development experience even better. Keep coding and stay awesome! ✨


Welcome to the latest update! We've made some nifty improvements and squashed a few bugs. Let's dive into the details! πŸš€

### New Features & Improvements
- **Update socket lifecycle docs**: Clarified that `phx-connect` and `phx-disconnected` are bindings, not events. This helps avoid confusion with JavaScript events or LiveView socket events. The docs now show how to use these bindings to manage connection lifecycle events with JavaScript. πŸ“š
- **Consistent capitalization**: Ensured that references to CSS and JavaScript are consistently capitalized across the board. This includes documentation updates and some snazzy new features like CSS loading states for Phoenix-bound elements, event-specific CSS classes, and a client-side latency simulator. 🎨
- **Better assigns-eex.md**: Enhanced the Elixir guides to explain common pitfalls and best practices when using variables in LiveViews and LiveComponents. Emphasized the use of `assign/2`, `assign/3`, `assign_new/3`, and `update/3` functions over direct access in templates. πŸ› οΈ

Enjoy the smoother, clearer, and more consistent experience! 🌟

Welcome to the latest update! We've been hard at work polishing things up and adding some nifty features. Here’s what’s new and improved:

New Features & Improvements

  • Improved Error Handling Docs πŸ“š
    We’ve beefed up the error handling documentation in the server guide, especially for those tricky scenarios like when an organization has only one member. The docs now include detailed code examples and explanations on how LiveView reacts to exceptions during different stages. This should make it easier to handle unexpected errors and understand the best practices for error handling in your server-side development.

  • Form Handling During Uploads πŸš€
    We’ve made some cool changes in view.js to dispatch lock/unlock events without locking the form during upload progress. Now, you can selectively unlock specific elements, ensuring smooth transitions and interactions without unnecessary form locking. Your forms will now handle uploads like a breeze!

  • Clarified Stream Insert Limits πŸ”’
    We've added clarity on setting limits for stream_insert in Phoenix LiveView. Now, when inserting single items, you’ll need to pass the limit as an option to enforce it on the client. We’ve also provided examples to make it easier for you to manage streams effectively.

Bugfixes

  • Incomplete Doctype Error Handling πŸ› οΈ
    We’ve squashed the bug related to incomplete doctypes in the Phoenix Live View Tokenizer. Now, if an incomplete doctype is encountered, a syntax error will be raised, providing more informative feedback and making the tokenization process more robust.

Thanks for sticking with us! We hope these updates make your development experience smoother and more enjoyable. Happy coding! πŸš€


Welcome to the latest updates! We've been busy squashing bugs, improving documentation, and refining features to make your experience smoother and more efficient. Here’s what’s new:

New feature πŸ†•

  • Improvements to Error Handling Docs (#3282): We've revamped the error handling section in our server guide! This includes detailed scenarios and code examples on how to handle unexpected errors, like when an organization has only one member. Plus, we've explained how LiveView reacts to exceptions during different stages. This should help you master error handling like a pro!

Bugfix 🐞

  • Raise on Incomplete Doctype (#3055): Fixed an issue where the Phoenix Live View Tokenizer would not handle incomplete doctypes properly. Now, it raises a syntax error, making it easier to debug and ensuring the tokenizer is more robust.

Improvement πŸš€

  • Clarify Limit for Stream Insert (#3276): Updated the documentation to specify that the limit must be passed as an option in each call to stream_insert/4. This ensures the limit is enforced on the client side. We’ve also added examples to make it crystal clear how to use this feature.

  • Dispatch Lock/Unlock and Do Not Lock Form on Upload Progress: Enhanced the view.js file to dispatch lock and unlock events without locking the form during upload progress. This ensures smoother user interactions and prevents unnecessary form locking.

Chore 🧹

  • Update Changelog: The changelog has been updated with details on recent enhancements, bug fixes, and backwards incompatible changes. This includes a new warning when rendering an input named "id" and better tracking for checkboxes and hidden inputs.

Stay tuned for more updates and happy coding! πŸš€

Showing 1 of 13 Entries