GetStream / stream-chat-react-native

💬 React-Native Chat SDK ➜ Stream Chat. Includes a tutorial on building your own chat app experience using React-Native, React-Navigation and Stream
https://getstream.io/chat/sdk/react-native/
Other
973 stars 324 forks source link

[🐛] White ghost modal issue still exist #2655

Closed sraut1 closed 1 month ago

sraut1 commented 2 months ago

Issue

This issue occurs on intermittently on keyboard hide and also regularly when app is switched from portrait to landscape. here is the video

https://github.com/user-attachments/assets/41aeb257-5102-4198-a0d7-ba3014d0ede4

Screenshot 2024-09-05 at 10 35 30 AM

Steps to reproduce

Steps to reproduce the behavior:

  1. Play a YouTube video using the YouTubePlayer component (react-native-youtube-iframe).
  2. Switch the video to fullscreen mode.
  3. Rotate the device to landscape orientation while in fullscreen mode.
  4. Rotate back to portrait mode
  5. Exit fullscreen mode.

Expected behavior

Project Related Information

Device: iPhone 15 Pro or Galaxy S23 OS + version: iOS 17.4 Expo verison 51.0.24 stream-chat-expo: 5.36.1 stream-chat-react-native: 5.34.0 gorhom/bottom-sheet: 4.6.4 via stream-chat-react-native-core

Customization

Click To Expand

```typescript jsx # N/A ```

Offline support

Environment

Click To Expand

#### `package.json`: ```json # N/A ``` **`react-native info` output:** ``` OUTPUT GOES HERE ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **`stream-chat-react-native` version you're using that has this issue:** - `e.g. 5.4.3` - Device/Emulator info: - [ ] I am using a physical device - OS version: `e.g. Android 10` - Device/Emulator: `e.g. iPhone 11`

Additional context

Screenshots

Click To Expand


sraut1 commented 2 months ago

@santhoshvai @vanGalilea

sraut1 commented 2 months ago

@khushal87 I saw check was added in latest version to open AttachmentPicker. but still AttachmentPicker is getting opened randomly in the app:

{isImageMediaLibraryAvailable() ? ( <AttachmentPicker ref={bottomSheetRef} {...attachmentPickerProps} /> ) : null}

isImageMediaLibraryAvailable() is always true

khushal87 commented 2 months ago

Hey @sraut1, the isImageMediaLibraryAvailable() is true because the cameraroll dependency is there for you in your project. We also introduced an option to switch to a native image picker, so maybe you can try that out.

Here is the guide - https://getstream.io/chat/docs/sdk/reactnative/guides/native-image-picker/

sraut1 commented 2 months ago

Hey Thanks for the response @khushal87 we do allow camera/gallery access in the app but through expo-camera, we are not using camera roll for chat functionality though. but even though someone is using react-native-camera-roll, AttachmentPicker popping randomly in the app is buggy. any suggestion?

khushal87 commented 2 months ago

Yeah, for the expo, it should be expo-media-library for your case. About the issue with the attachment picker, we will triage it and get back to you once it's reproducible. Thanks 😄

sraut1 commented 1 month ago

Thanks @khushal87 removing expo-media-library resolves the issue as isImageMediaLibraryAvailable() returns false.

khushal87 commented 1 month ago

Fixed with #2687

arekkubaczkowski commented 4 weeks ago

well, this issue still exist on the latest (5.39.1) version. this happens after orientation change.

cc @khushal87 image

arekkubaczkowski commented 4 weeks ago

should we reopen it?

khushal87 commented 4 weeks ago

Hey @arekkubaczkowski, I don't see this problem when using the keyboard or the image gallery on the latest version when I change orientation as well.

https://github.com/user-attachments/assets/b7414dbb-a78b-4bfb-b5d6-44874c5ad221

arekkubaczkowski commented 4 weeks ago

well, on your video the bottom sheet appears for a moment, I believe this is not a desired behavior, in my case it just shows for a bit longer.

khushal87 commented 4 weeks ago

Yes, the flickering is a well-known issue for bottom sheet package - https://github.com/gorhom/react-native-bottom-sheet/issues/516 and I don't see there's a fix yet.