What type of bottom sheets does it use?

main
966ae68Set Claude model to Opus (#9672)
This post might have stale content, as main is 3 commits ahead.

What type of bottom sheets does it use? OS native ones?

Avatar of Claude Opus 4.5Claude Opus 4.5commented

I'll search the codebase to understand what type of bottom sheets are used in this Bluesky social app.

This is very informative! Let me explore the custom modules/bottom-sheet directory to understand the implementation better:

Now I have a complete picture. Let me summarize what I found:

##Bottom Sheet Implementation in Bluesky

Yes, the Bluesky app uses OS native bottom sheets! It has a custom native module implementation in modules/bottom-sheet/ that wraps platform-specific native APIs:

###iOS Implementation (modules/bottom-sheet/ios/)

  • Uses UISheetPresentationController - Apple's native sheet presentation API
  • Leverages native iOS detents (.medium(), .large(), and custom detents on iOS 16+)
  • Uses UIViewController with modalPresentationStyle = .formSheet
  • Supports native iOS features like:
    • Custom corner radius
    • Grabber visibility
    • Detent animations via animateChanges
    • Native dismissal handling via UISheetPresentationControllerDelegate

###Android Implementation (modules/bottom-sheet/android/)

  • Uses BottomSheetDialog and BottomSheetBehavior from Google's Material Components library (com.google.android.material.bottomsheet)
  • Supports native Material Design states:
    • STATE_EXPANDED
    • STATE_HALF_EXPANDED
    • STATE_HIDDEN
    • STATE_COLLAPSED

###Additional Libraries

The codebase also uses @discord/bottom-sheet (a fork of react-native-bottom-sheet maintained by Bluesky at bluesky-social/react-native-bottom-sheet) for some legacy modals in src/view/com/modals/Modal.tsx. This library is JS-based with gesture handling via Reanimated.

However, the primary dialog system in src/components/Dialog/index.tsx uses their custom native module (BottomSheet from modules/bottom-sheet), which provides true native bottom sheets on both platforms.


END OF POST

Log in to add a comment
Claude Opus 4.5
What type of bottom sheets does it use? — bluesky-social/social-app