Reorder queue via drag-and-drop and move up/down buttons - #16
Open
prateeekbuilds wants to merge 1 commit into
Open
Reorder queue via drag-and-drop and move up/down buttons#16prateeekbuilds wants to merge 1 commit into
prateeekbuilds wants to merge 1 commit into
Conversation
Allow anyone in a room to reorder videos in the shared playback queue using either HTML5 drag-and-drop or Move Up (▲) / Move Down (▼) buttons on each queue item. Reordering is keyed by the item's stable qid and target destination index, broadcasting queue_update across all connected clients to keep the queue in sync. Added drag preview, drop position indicators, and disabled state styling for boundary move buttons across all themes. Closes 7akob#8
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR implements queue reordering as requested in #8, allowing users to reorder videos in the shared playback queue via both native drag-and-drop and accessible Move Up / Move Down buttons on each queue item.
Key Changes
reorder_queuesocket event inserver.jsthat looks up queue items by their stableqid, handles target index clamping, and re-emitsqueue_updateto keep all connected clients in sync.dragstart,dragover,dragleave,drop,dragend). Dynamic drop indicators (.drag-over-top/.drag-over-bottom) accurately position items above or below target items based on midline cursor position.▲) & Move Down (▼) Buttons: Added reorder buttons on every queue item with boundary disabling (Move Up disabled for the top item, Move Down disabled for the last item)..is-dragging), and drop indicators styled withvar(--star)to blend with all themes (yt2008,neon90s,midnight).skood-v4inpublic/sw.js.Closes #8