Skip to content

Commit 5a20b85

Browse files
dylanjeffersclaude
andauthored
Fix bottom tab bar color clipping after comment drawer opens (#14224)
## Summary The comment drawer rendered a white `Box` overlay over the bottom safe area (to color the gap below the `BottomSheetFooter`, which uses `bottomInset={insets.bottom}`). That Box was rendered alongside the modal in JSX, so it stayed mounted after the drawer was dismissed and covered the bottom tab bar's safe-area padding — which uses `surface1` (`neutral.n25`), not pure `white` — producing a visible color seam at the bottom of the screen once the drawer had been opened. The fix only renders the overlay while the drawer is actually visible by tracking the bottom-sheet index in `onChange` (`index >= 0` ⇒ visible). - File: `packages/mobile/src/components/comments/CommentDrawer.tsx` ## Test plan - [ ] Open the app, scroll the trending feed, and confirm the bottom tab bar's safe-area region matches the bar's `surface1` color (no white seam at the bottom). - [ ] Open a track's comments drawer, then dismiss it. Confirm the bottom tab bar returns to a uniform color (no white strip). - [ ] Open the comments drawer fully — the area beneath the input footer should still be white (continuous with the footer), confirming the overlay still works while the drawer is open. - [ ] Repeat on iOS and Android with both light and dark themes. https://claude.ai/code/session_01ALEgYGfS29Q87MXTMqCP2s --- _Generated by [Claude Code](https://claude.ai/code/session_01ALEgYGfS29Q87MXTMqCP2s)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4cf2bee commit 5a20b85

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@audius/mobile': patch
3+
---
4+
5+
Fix bottom tab bar color clipping after the comment drawer opens. The drawer rendered a white overlay over the bottom safe area to color the gap below its footer, but it was kept mounted after dismissal and covered the tab bar's surface1 padding, leaving a visible color seam at the bottom. The overlay now only renders while the drawer is visible.

packages/mobile/src/components/comments/CommentDrawer.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ export const CommentDrawer = (props: CommentDrawerProps) => {
245245
const [acText, setAcText] = useState('')
246246
const [replyingAndEditingState, setReplyingAndEditingState] =
247247
useState<ReplyingAndEditingState>()
248+
const [isDrawerVisible, setIsDrawerVisible] = useState(false)
248249

249250
const setAutocompleteHandler = useCallback(
250251
(autocompleteHandler: (user: UserMetadata) => void) => {
@@ -298,6 +299,7 @@ export const CommentDrawer = (props: CommentDrawerProps) => {
298299

299300
const handleSheetChanges = useCallback(
300301
(index: number) => {
302+
setIsDrawerVisible(index >= 0)
301303
// When the sheet first opens (index >= 0), snap to index 1 (85%) if it's at index 0 (50%)
302304
if (index === 0 && bottomSheetModalRef.current) {
303305
// Use a small delay to ensure the modal is fully presented
@@ -360,16 +362,18 @@ export const CommentDrawer = (props: CommentDrawerProps) => {
360362
)}
361363
</CommentSectionProvider>
362364
</BottomSheetModal>
363-
<Box
364-
style={{
365-
backgroundColor: color.background.white,
366-
position: 'absolute',
367-
bottom: 0,
368-
width: '100%',
369-
zIndex: 5,
370-
height: insets.bottom
371-
}}
372-
/>
365+
{isDrawerVisible ? (
366+
<Box
367+
style={{
368+
backgroundColor: color.background.white,
369+
position: 'absolute',
370+
bottom: 0,
371+
width: '100%',
372+
zIndex: 5,
373+
height: insets.bottom
374+
}}
375+
/>
376+
) : null}
373377
</>
374378
)
375379
}

0 commit comments

Comments
 (0)