Giter Site home page Giter Site logo

papercups-io / chat-widget-native Goto Github PK

View Code? Open in Web Editor NEW
27.0 3.0 18.0 309 KB

Papercups chat widget for React Native/Expo

Home Page: https://snack.expo.io/@reichertjalex/papercups

JavaScript 6.00% TypeScript 94.00%
chat-widget chat react-native expo

chat-widget-native's People

Contributors

reichert621 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chat-widget-native's Issues

Dark mode support

I expect most apps now to support dark mode, as it's pretty easy to do.
Would be great for Papercups chat widget to support this too - I imagine we could configure via the iframe query string, and either just set darkMode=true and you set the dark colour scheme, or we pass in options like backgroundColor, textColor, etc.

I'd fork the repo and implement myself if it wasn't implemented via an iframe.

UI elements slide up when keyboard opens?

Encountered this somewhat puzzling UI behaviour: when you start typing and the keyboard slides up, the header and previous messages slide up out of view too?
Would be great to keep as much context as possible for the user - is there a way to do this?

Note this is in React Native on iOS with Expo.

Before:

After:

Support callbacks

We currently support some callbacks (like onMessageReceived) in the web widget -- need to add these to the RN version as well.

(May need to leverage window.ReactNativeWebView.postMessage(data);)

Customer metadata not showing in web portal

I'm trying to have the customer's custom metadata show in the web portal. When a message is sent, the customer's external_id, email, and name are visible in the web portal, but not other metadata. However, when I log out and log back in my app, and I refresh the web portal's page, then the metadata appears.

I also notice that I'm getting the following TypeScript error when I try to add custom metadata:

Type '{ external_id: string; email: string; name: string; metadata: { email: string; isPaid: boolean; surgery: string; surgeryType: string; }; }' is not assignable to type 'CustomerMetadata'.
Object literal may only specify known properties, and 'metadata' does not exist in type 'CustomerMetadata'.ts(2322)

image

Add prop for `scrollEnabled`

From Slack:

for the react native implementation of the chat, something that was a little annoying was the fact that a user could scroll the WebView so that it didn't feel 'native'. for my setup, I've added scrollEnabled={false} to the WebView and it behaves, imo, much better - maybe this can be added as a prop?

Invariant Violation: Tried to register two views with the same name RNCWebView

I already have react-native-webview in my package.json and use it in my app, I believe this is why the error shows up. It disappears the moment I don't render the ChatWidget.

A solution that crosses my mind is not to add react-native-webview widgets package.json, but additionally just add to root package json as proprietary package so that this conflict doesn't happen.

The app works when I remove the react-native-webview from the inside of node_modules. ๐Ÿ’ช

ERROR Invariant Violation: Tried to register two views with the same name RNCWebView
(node:96746) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 change listeners added. Use emitter.setMaxListeners() to increase limit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.