stream-chat-react-native icon indicating copy to clipboard operation
stream-chat-react-native copied to clipboard

Image Gallery customization

Open Marcoo09 opened this issue 2 years ago • 3 comments

Describe the bug If we attach big images and try to see them in the preview they are cut off by the footer and header.

Dev environment info:

  • stream-chat-react-native 5.0.0
  • react-native: 0.68.3
  • Device/Emulator (android/ios) and OS version: Iphone 8 with IOS 15 and Samsung A50 with Android 12

To Reproduce Steps to reproduce the behavior:

  1. Go to the chat
  2. Attach some big images
  3. Open images
  4. See cut images

Expected behavior I'm not sure if it's the expected behavior, but we should be able to specify like a prop 'scale to fit' or sth like that.

Additional context I'm using react-navigation with status bar and tab bar navigator, both makes the space of the screen a bit smaller. I hide the stream header, I use a transparent header in react navigation and with the left button of status bar I handle the hide overlay logic.

Marcoo09 avatar Sep 02 '22 16:09 Marcoo09

@Marcoo09 could you please share some screenshot pointing out the issue?

vishalnarkhede avatar Sep 06 '22 21:09 vishalnarkhede

Yes, sure. In this case it is more striking but having a transparent header and only the tab bar in two other apps in which I use stream it also happens The workaround I use is override the onPressMessage, check that the messages has attachements and hide the status bard and tab bar navigator

https://user-images.githubusercontent.com/18408823/189786052-77e536e7-511c-4436-bfae-95fa3bd3a894.mov

Marcoo09 avatar Sep 13 '22 01:09 Marcoo09

@Marcoo09 thanks for providing the info, we added this issue to the backlog.

vanGalilea avatar Sep 13 '22 08:09 vanGalilea

I think we had the same issue before If I remember the solution is to place the OverlayProvider (from stream) higher in the DOM.

https://getstream.io/chat/docs/sdk/reactnative/basics/stream_chat_with_navigation/

neopit avatar Oct 10 '22 15:10 neopit

Hey @Marcoo09, @neopit's point makes sense, please check our docs and raise the OverlayProvider to the highest level that works for you.

vanGalilea avatar Oct 11 '22 08:10 vanGalilea

Hey @vanGalilea @neopit, I have the O OverlayProvider at the top of DOM and the problem happens

Marcoo09 avatar Oct 11 '22 08:10 Marcoo09