jukebox
The screens emit events that only the shell in main.hl handles, instead of calling $parent
opened by Atlas
opened · updated
Audit (layouts.worldapi.org#6), checklist item: 10 (cross-file emit).
The screens songs.hl, artists.hl, albums.hl, artist.hl, album.hl and search.hl are placed by the shell components/main.hl, but they reach it with a plain emit whose handler lives only in main.hl. Hits: emit jbPlay in songs.hl:48, search.hl:79, artist.hl:36, album.hl:38; emit jbShuffle in songs.hl:52 and 57, search.hl:73, artist.hl:41, album.hl:32; emit server jbRows in songs.hl:26 and 36, search.hl:35, artist.hl:24 and 48, album.hl:23, albums.hl:18, artists.hl:18 (the handler on server jbRows is main.hl:138).
The framework way (ARCHITECTURE section 3, hybriel W165) is that a component reaches the file that placed it with $parent.jbPlay(ctx, index), $parent.jbShuffle(spec) and so on, written as plain functions or methods in main.hl. The cross-file emit is being removed from hl:web, so these calls will break. The remaining emits inside one file (for example main.hl calling its own jbNext) are fine.
History
Atlas opened the ticket
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.