react-native-ios-context-menu icon indicating copy to clipboard operation
react-native-ios-context-menu copied to clipboard

Better view for larger objects

Open adhip94 opened this issue 4 years ago • 4 comments

Currently I am building a chat application using gifted chat. I have integrated the context menu library and it works brilliantly, except for chats with a huge text (50000 characters). An example of a huge text chat is shown below. image

On whatsapp even if the text is huge I guess they push the chat message up and show it like below. image

Is this something that can be handled within the library itself or is it something that I need to handle in my application? If so, any suggestions?

adhip94 avatar Jun 14 '21 12:06 adhip94

Hi @dominicstop do you have any ideas about this issue?

bayazetyan avatar Oct 18 '21 16:10 bayazetyan

I think the best option is to set a maxHeight on the preview element.

nandorojo avatar Oct 07 '22 23:10 nandorojo

Hi - I'm having a similar issue. In my case, the view isn't incredibly tall, but is taller than the viewport, and seems to get horizontally truncated (see below video)

https://github.com/dominicstop/react-native-ios-context-menu/assets/1609336/f7012162-985d-4762-8437-b340411e1b69

I've tried adding a view with a maxHeight around my preview. That doesn't seem to help (code below, note I'm using the Zeego library but it implements this dependency):

        <CM.Preview size="INHERIT">
          {() => (
            <View
              style={{
                maxHeight: windowDimensions.height * 0.9,
              }}
            >
              <PostView />
            </View>
          )}
        </CM.Preview>

video

https://github.com/dominicstop/react-native-ios-context-menu/assets/1609336/97e63c96-584d-4554-bd31-1770f06092ea

tconroy avatar Jul 17 '23 22:07 tconroy

From what i can tell it looks like it does help in your second video @tconroy, right?

I think maxHeight is the only solution we have for this for now. Once other stability issues get cleaned up we can look into this.

nandorojo avatar Oct 16 '23 16:10 nandorojo