Skip to content

fix(mobile): render DrawerPortal inside BottomSheetModalProvider so comment kebab opens#14391

Merged
dylanjeffers merged 1 commit into
mainfrom
fix/mobile-comment-kebab-portal
May 22, 2026
Merged

fix(mobile): render DrawerPortal inside BottomSheetModalProvider so comment kebab opens#14391
dylanjeffers merged 1 commit into
mainfrom
fix/mobile-comment-kebab-portal

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

The kebab overflow menu on a comment in the mobile Comment Drawer wasn't opening — tapping it did nothing. This is a follow-up to #14385 which removed a redundant CommentSectionProvider wrap but didn't actually fix the user-facing bug.

Root cause

@gorhom/bottom-sheet's BottomSheetModalProvider wraps its children in its own nested <PortalProvider rootHostName='bottom-sheet-portal-XXX'> with an isolated host registry. @gorhom/portal resolves a Portal's hostName against the nearest PortalProvider only — it does not walk up to outer providers.

With the DrawerPortal host registered as a sibling of BottomSheetModalProvider, any <Portal hostName='DrawerPortal'> rendered from inside a bottom sheet (the kebab on a comment row, or the track-owner overflow in CommentDrawerHeader) resolved through the inner provider, found no DrawerPortal host, and silently rendered nowhere. onPress fired, state updated, but the action drawer never appeared.

Fix

Move <PortalHost name='DrawerPortal' /> from outside BottomSheetModalProvider to inside it (alongside ChatReactionsPortal). Now it's registered in the same registry the inner Portals look up. External callers (e.g. ContestCommentsList outside any bottom sheet) still find it through the same provider chain because there's only one PortalProvider between them and the host.

Test plan

  • Tap kebab on a comment in the mobile Comment Drawer → action drawer appears with Share / Mute Thread / Edit / Delete
  • Tap kebab on another user's comment → drawer appears with Flag, Mute User, etc.
  • Tap a row in the action drawer → drawer closes, action runs
  • Tap backdrop to dismiss the action drawer; tap kebab again → drawer reopens on first tap
  • Verify ContestCommentsList kebab still works (caller outside any bottom sheet)
  • Track-owner kebab in CommentDrawerHeader still works (same DrawerPortal host)

🤖 Generated with Claude Code

…omment kebab opens

@gorhom/bottom-sheet's BottomSheetModalProvider wraps its children in its own
nested PortalProvider with an isolated host registry. @gorhom/portal resolves a
Portal's hostName against the nearest provider only — it doesn't walk up. With
the DrawerPortal host registered as a sibling of BottomSheetModalProvider, every
<Portal hostName='DrawerPortal'> rendered from inside a bottom sheet (e.g. the
kebab on a comment row, or the track-owner overflow in CommentDrawerHeader)
resolved through the inner provider, found nothing, and silently rendered
nowhere. The press fired, state updated, but the action drawer never appeared.

Moving the host inside BottomSheetModalProvider puts it in the same registry
the inner Portals look up, so the action drawer renders correctly. External
callers (e.g. ContestCommentsList outside any bottom sheet) still resolve it
through the same provider chain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

⚠️ No Changeset found

Latest commit: edd8046

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers dylanjeffers merged commit 5612392 into main May 22, 2026
3 checks passed
@dylanjeffers dylanjeffers deleted the fix/mobile-comment-kebab-portal branch May 22, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant