We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
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 theforce_assign
function to better handle change tracking for nested structures. Now it stores the current value in thechanged
map only if it's a list or map, preserving the original value. For non-collection types, a default value oftrue
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 thename
attribute inPhoenix.Component.dynamic_tag/1
. Keep your eyes peeled fortag_name
! π -
Bugfix: Fix typo in
attach_hook/4
doc
We squashed a tiny typo in theattach_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 theforce_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 theelement
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 thehas_element?
andelement
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 therender_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 ofrequired
), 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 thelv:clear-flash
event to theclear_flash/1
andclear_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 asc:mount/3
. We've also clarified the usage of theattach_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 ofPhoenix.Component.dynamic_tag/1
will be replaced withtag_name
.
Morphdom Bump π
We've bumped the morphdom
dependency to version 2.7.4. This update includes:
indexTree
call afterbeforeUpdateResult
.- 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 indom_patch.js
and updates to thestreams.spec.js
test file. A new button for hiding elements using JS is also added to theStreamLive
module instreams.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 theassets/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 intest/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 utilizeput_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 invalidsigil_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 forPhoenix.HTML.FormField
. This regex helps in quickly identifying and updating instances of thephx-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 usingpush_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
, andtest/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 forlive_file_input
cannot be overwritten. π - Added guidance on creating a label with a
for
attribute pointing to theUploadConfig
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 inview.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 forstream_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! π