-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add live_component handler to the LiveView integration (#50)
* Add LiveView handler for live_component events This patch adds a new function clause that handles :live_component events, which is based on the :live_view handle_event implementation, but doesn't include session data, as that's not present in live components. * Detach live_component handlers in LiveViewTest Because the handlers weren't detached, the test suite started failing sometimes because events came in twice. By detaching the handlers like we do for all other events, we only have one set of handlers running in the test suite. * Remove extra LiveView clause for live_components By depending on :appsignal 2.2.16 or above, the event handler can call set_sample_data with an empty value for metadata without breaking the call chain, so both function clauses can be merged. * Add changeset to ecplain live_component handling "Handle live_component events in LiveView integration" Co-authored-by: AJ Foster <2789166+aj-foster@users.noreply.github.com>
- Loading branch information
1 parent
e5da1e5
commit c915a34
Showing
4 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
.changesets/handle-live_component-events-in-liveview-integration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
bump: "patch" | ||
type: "add" | ||
--- | ||
|
||
Handle live_component events in LiveView integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters