Skip to content

feat: offer an opt-in Expo UI Bottom Sheet solution over gorhom - #3940

Open
frankcalise wants to merge 2 commits into
GetStream:developfrom
frankcalise:frankcalise/expo-ui-bottom-sheet
Open

frankcalise wants to merge 2 commits into
GetStream:developfrom
frankcalise:frankcalise/expo-ui-bottom-sheet

Conversation

@frankcalise

Copy link
Copy Markdown
Contributor

🎯 Goal

Offer an opt-in native Expo UI attachment picker for downstream Expo apps while preserving the Gorhom picker as the SDK default. This integration targets iOS and Android; web is out of scope.

🛠 Implementation details

  • Add an overridable AttachmentPicker component slot and modal/inline presentation configuration.
  • Expose ExpoAttachmentPicker through stream-chat-expo/attachment-picker, keeping @expo/ui an optional peer isolated from the main SDK entry point.
  • Await modal dismissal before opening camera, files, poll creation, or focusing a selected command.
  • Handle Android rapid close/reopen, cancellation, and late dismissal after unmount.
  • Opt ExpoMessaging into the adapter; set EXPO_PUBLIC_ATTACHMENT_PICKER=gorhom to compare the default picker.
  • Register command UI middleware in ExpoMessaging so picker-selected Giphy commands include the command prefix in channel and thread messages.
  • Include the minimal Expo 58 patch needed for the Xcode 27 launch compatibility issue encountered during validation.

🎨 UI Changes

The opt-in picker uses the native Expo UI modal sheet with an explicit Close action. Gorhom remains unchanged for apps that do not opt in.

Before/after iOS and Android screenshots or recordings still need to be attached.

🧪 Testing

  • SDK build, lint, and workspace typechecks passed during implementation; core and ExpoMessaging typechecks also passed after command middleware wiring.
  • Regression coverage: Android close/reopen lifecycle, optional dependency isolation, unchanged default picker, modal composer spacing, dismissal handoffs, and outgoing Giphy command payloads for channel/thread composers.
  • iOS simulator launch and sheet open/close verified; Android manual open/close confirmed.
  • Contributor manually confirmed camera, file, poll, thread attachment-sheet, and Giphy flows.
  • An Android thread composer keyboard overlap was reported independently of opening the sheet. The pre-existing thread keyboard offset is a suspect; a Gorhom comparison has not established the cause. No keyboard-layout changes are included.
  • Final full Jest run: 202 suites passed, 1,657 tests passed, 12 snapshots passed; 2 suites/14 tests skipped. No worker-teardown warning appeared in this run (earlier runs had one; focused open-handle checks also passed).
  • Remaining acceptance coverage: explicit swipe/back dismissal and accessibility checks; SampleApp native regression checks have not been performed.

☑️ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android (flows above verified; remaining coverage noted)

No Linear ticket is currently associated with this fork contribution; coordinate with the Stream team before opening under the repository's ticket requirement.

Add an optional Expo attachment-picker entry point and component override.
Retain Gorhom as the SDK default and enable the adapter in ExpoMessaging.
Coordinate modal dismissal and add focused tests and recorded UI flows.

Include the approved Expo 58.0.9 demo patch for the Xcode 27 launch fix.
Native builds, focused tests, typechecks, and the iOS open/close replay pass.
Web coverage, modal handoffs, and Android rapid-reopen timing remain follow-up work.
@isekovanic
isekovanic self-requested a review November 5, 2026 14:54
@isekovanic

Copy link
Copy Markdown
Contributor

Hi @frankcalise ! Thank you for the contribution.

Just a heads up, I will be able to take a more serious look at this next week, as tomorrow we are going to be releasing V10.

It will likely need to be ported there since I probably won't feel comfortable releasing this on V9 (at least not immediately). I'll let you know my thoughts then !

@frankcalise

Copy link
Copy Markdown
Contributor Author

@isekovanic all good, there's no rush!

I can take a look at the v10 part when it gets through, unless you want it against that feature branch to start

@isekovanic

Copy link
Copy Markdown
Contributor

No no, that's okay - I'll anyway need some time to look through it properly which I likely won't be able to do until tomorrow. I'll let you know !

Thanks a bunch 🚀

@isekovanic isekovanic mentioned this pull request Nov 6, 2026
1 of 6 tasks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants