Frank Stellmacher
|
ef5eda263d
|
refactor(context-menu): H.1–H.12 — extract submenus + 5 type-branch components + hooks (Phase H start) (#662)
* refactor(context-menu): H.1 — extract helpers + constants
* refactor(context-menu): H.2 — extract AddToPlaylistSubmenu component
* refactor(context-menu): H.3 — extract AlbumToPlaylistSubmenu + ArtistToPlaylistSubmenu
* refactor(context-menu): H.4 — extract MultiAlbumToPlaylistSubmenu
* refactor(context-menu): H.5 — extract MultiArtistToPlaylistSubmenu
* refactor(context-menu): H.6 — extract SinglePlaylist + MultiPlaylist submenus
* refactor(context-menu): H.7 — extract startRadio/startInstantMix/downloadAlbum/copyShareLink actions
* refactor(context-menu): H.8 — extract useContextMenuKeyboardNav hook
* refactor(context-menu): H.9 — extract useContextMenuRating hook
* refactor(context-menu): H.10 — extract ContextMenuItems (all 9 type branches)
* refactor(context-menu): H.11 — split ContextMenuItems into 5 type-branch files
ContextMenuItems.tsx (800 LOC) was just a moved 400-LOC-cap violation.
Now ContextMenuItems is a 30-LOC switch that dispatches to:
- SongContextItems (song + album-song + favorite-song)
- QueueItemContextItems (queue-item)
- AlbumContextItems (album + multi-album)
- ArtistContextItems (artist + multi-artist)
- PlaylistContextItems (playlist + multi-playlist)
All five branch files are now under 330 LOC; ContextMenu.tsx itself stays
at 194 LOC. Shared Props interface lives in contextMenuItemTypes.ts.
* refactor(context-menu): H.12 — strip unused imports from branch components
|
2026-05-13 21:06:49 +02:00 |
|