-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shared event handlers #571
Merged
Merged
Changes from 16 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
35b8577
replace page event handlers with global event handlers
APB9785 5f3352c
some fixes
APB9785 8dfc35a
remove preload
APB9785 2e36c28
update loader
APB9785 d95dee0
fix repo error
APB9785 407dabc
test fixes
APB9785 90c4361
fixes
APB9785 e822efc
fixes
APB9785 48b8b92
fix
APB9785 cb72042
group query
APB9785 3aee076
try with max()
APB9785 2356de6
cast id as text
APB9785 44493b5
cast the cast
APB9785 b5bf1c5
convert to elixir
APB9785 4e77ee2
fix migration
APB9785 890b3de
Merge branch 'main' into apb/global-event-handlers
leandrocp ec1ebb1
changelog
leandrocp 9d6871d
changelogs edits
APB9785 40babaa
eventhandlers loader
APB9785 a991c52
setup test helper
APB9785 8f9cafa
reload after fixtures
APB9785 33a4f16
import Beacon.Web
APB9785 9b5c1c6
fix migration
leandrocp 9aa80f6
remove preload
leandrocp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still one step missing here :)
Whenever an event handler changes we'd need to broadcast a message to recompile all page modules so I'm wondering if it would be better to create a new
EventHandler
module containing allhandle_event
and on thehandle_event
ofPageLive
herebeacon/lib/beacon/web/live/page_live.ex
Lines 70 to 76 in ce916b5
We just replace
page_module
withevent_handler_module
.In this case whenever an event handler changes we only recompile the single event handler module and save resources by not duplicating the same event_handler on all page modules.
Wdyt?