fix(mobile): commenting fails on tracks with zero existing comments#14329
Merged
Conversation
The comment drawer renders a plain `<Flex><NoComments /></Flex>` for the empty state and only mounts a `BottomSheetFlatList` once at least one comment exists. Inside Gorhom's BottomSheetModal, scrollable content has to live inside a BottomSheet* component for keyboard avoidance and touch propagation to the footer composer to work. Swapping to a plain Flex on 0-comment tracks breaks the send button — the user's tap never reaches the form's onSubmit handler. Always render the BottomSheetFlatList and move the NoComments view into `ListEmptyComponent` so the bottom-sheet plumbing stays mounted in both states. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
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
<Flex><NoComments /></Flex>for the empty state and only mounting aBottomSheetFlatListonce at least one comment existedBottomSheet*component for keyboard avoidance + touch propagation to the footer composer to workBottomSheetFlatList, moveNoCommentsintoListEmptyComponentso bottom-sheet plumbing stays mounted in both statesRoot cause
packages/mobile/src/components/comments/CommentDrawer.tsxCommentDrawerContenthad two return branches:The plain
<Flex>doesn't participate in Gorhom's gesture/keyboard system, so taps in the footer'sBottomSheetFooter(the form) get eaten by the gesture recognizer instead of reaching the send button. Swapping the empty-state branch into aListEmptyComponentkeeps theBottomSheetFlatListmounted in both states and the send-button tap reaches the composer.Test plan
🤖 Generated with Claude Code