Implement custom queue bottom sheet gesture#372
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| LaunchedEffect(queueHiddenOffsetPx) { | ||
| if (queueHiddenOffsetPx > 0f && queueSheetOffset.value == 0f) { | ||
| queueSheetOffset.snapTo(queueHiddenOffsetPx) | ||
| } |
There was a problem hiding this comment.
Keep queue sheet open when its size changes
The new LaunchedEffect(queueHiddenOffsetPx) snaps the queue sheet offset back to queueHiddenOffsetPx whenever the hidden offset changes, regardless of the current state. Because queueHiddenOffsetPx is recomputed on every layout pass (e.g., when songs are added/removed from the queue or bottom insets change), an expanded queue sheet will immediately jump closed as soon as its height changes, interrupting interactions like reordering or clearing items. Consider running this initialization only on first measurement or when the sheet is already hidden so size changes don’t forcibly dismiss an open queue.
Useful? React with 👍 / 👎.
The drag gesture for the queue sheet was not working as expected. Wrapping the `QueueBottomSheet` within a `Box` composable and adding top padding to the drag handle resolves the issue.
Summary
Testing
Codex Task