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
Welcome to the latest update! We've made some exciting improvements to enhance your experience and smoothen your development journey. Let's dive into the details! 🚀
Improvements
-
Default
force: true
in Single File Scripts: We've setforce: true
as the default in single-file scripts, making it easier for you to install dependencies without a hitch. This ensures you're always working with the latest and greatest versions of libraries. Plus, we've polished up some script tags to keep things looking fresh! 🛠️ -
Detect Duplicate IDs in LiveViewTest: Duplicate IDs? Not on our watch! We've added a nifty feature that catches duplicate IDs in the DOM during LiveView testing. This prevents any hiccups with morphdom and keeps your app running smoothly. Unique IDs for everyone! 🎉
-
Clarified Elixir Version Requirements: We've updated our docs to specify Elixir v1.14.1+ as the minimum version needed. This little tweak helps avoid any version-related surprises and keeps everything running like a well-oiled machine. 🔧
These changes are here to make your coding life a breeze. Keep building amazing things! ✨
Included Commits
This commit clarifies the version requirements for Elixir in the project documentation. Specifically, it updates the requirement from Elixir v1.14+ to Elixir v1.14.1+, ensuring that users are aware of the minimum version needed for compatibility. This change helps prevent potential issues that could arise from using an earlier version of Elixir.
Additionally, the commit includes a minor modification to the CHANGELOG.md file, which reflects this updated requirement. The change aims to enhance clarity for developers and users of the project, contributing to better maintenance and usability. The commit also notes a bug fix related to LiveView navigation, which addresses a specific issue with routing behavior.
Files changed
- CHANGELOG.md
The recent commit titled "raise on duplicate ids in LiveViewTest" introduces a mechanism to detect duplicate IDs within the DOM during LiveView testing. This change is crucial because having duplicate IDs can disrupt morphdom's ability to correctly patch the DOM, leading to potential undefined behavior at runtime. By traversing the HTML tree in the LiveViewTest
, the code now raises an error whenever it encounters duplicate IDs, ensuring that all elements maintain unique identifiers.
The implementation involves modifying the parse
function in lib/phoenix_live_view/test/dom.ex
to include a new function, detect_duplicate_ids
, which checks for duplicates in the parsed HTML structure. Additionally, this commit includes updates to various test files to reflect changes in element IDs, ensuring that the tests align with the new requirements for unique IDs. Overall, this enhancement aims to improve the robustness of LiveView applications by preventing issues related to duplicate IDs.
Files changed
- lib/phoenix_live_view/test/dom.ex
- test/phoenix_live_view/integrations/event_test.exs
- test/phoenix_live_view/integrations/nested_test.exs
- test/support/live_views/events.ex
This commit modifies the single-file sample scripts in the .github/single-file-samples
directory by setting the force: true
option as the default behavior in the Mix.install
function. This change is applied to both main.exs
and test.exs
files, ensuring that dependencies will be installed without checking for existing versions, which can help avoid potential conflicts during development. The commit also includes minor formatting adjustments to the script tags in the render
function of the Example.HomeLive
module.
The updates enhance the usability of the provided sample scripts by simplifying the dependency installation process and ensuring that developers can work with the latest versions of the libraries without manual intervention. Overall, this change aims to streamline the setup process for users testing or demonstrating features in the Phoenix framework and its LiveView capabilities.
Files changed
- .github/single-file-samples/main.exs
- .github/single-file-samples/test.exs