# Split the hooks out of app.js closes #554 #626
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
local-it/mitgliederverwaltung!626
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue/mitgliederverwaltung-554"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #554
Description of the implemented changes
The changes were:
assets/js/app.jsheld every LiveView hook and several page-specific listeners; it is now wiring only. Hooks with one owner live as colocated hooks next to the component or LiveView that uses them, hooks shared by several modules live inassets/js/hooks/, and a test fails when aphx-hookname resolves to no registered hook. While moving the clipboard hook, copying email addresses turned out to fail silently in Safari (and in Firefox after a slow server reply), because the clipboard write started only after the server round trip; it now starts in the click and the success toast waits for the browser's confirmation.What has been changed?
Definition of Done
Code Quality
Accessibility
Testing
Additional Notes
Oversized commits: "Colocate single-owner hooks …" (8 files, +406 −390, hook code moved out of app.js) and "Copy email addresses in Safari …" (14 files, +500 −178, about half of it tests).
The copy flow was checked in Firefox 150, Chromium 148 and WebKit 26.4 (Playwright) and by hand in Safari; LiveViewTest does not run JS, so the JS bundle build (
just mix assets.build) is not part ofjust ci-devyet — a follow-up adds it tojust lint.