Giter Club home page Giter Club logo

react-chat-ui's People

Contributors

dzoba avatar kaputokalan avatar mundia416 avatar ugoi 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-chat-ui's Issues

Is there a way to make the messages wider?

I just looked through your code, and couldn't find any css related to message width. Is there a way to make the messages wider? For some reason, it won't go wider than 272 px for me on either the incoming or outgoing messages.

Any advice would be greatly appreciated.

MessageList currentUserId does not work with mixed-cased. Should that be the case?

This does not work

<MessageList
    currentUserId={"markJohnsson"}
    messages={
      [
        {
          text: 'Hello',
          user: {
            id: "markJohnsson",
            name: 'Markus',
          },
        },
      ]
    }
/>

but this works

<MessageList
      currentUserId={"markjohnsson"}
      messages={
        [
          {
            text: 'Hello',
            user: {
              id: "markjohnsson",
              name: 'Markus',
            },
          },
        ]
      }
/>

Is this the expected behaviour?

Why do messages block copying?

For some reason, when your messages render in the chat, it's blocked from highlighting the text to copy.

I couldn't find anything about enabling/disabling copying on your code. I can highlight and copy text outside of your chat window.

Can you advise on how this might allow message copying? I could always put a button to do it myself, but preventing highlighting and copying feels like a poor usability experience to me, so I'm trying to get it to allow that.

Otherwise, I'm enjoying developing with MinChat so far for a demo I'm working on. :)

Thanks,
Dave

Autoscroll doesn't work

I create a simple app following the example in Readme. However, MessageList doesn't scroll to bottom when I add new messages.

CreateAt always coming as 'Just now'

The createdAt time is always mapping to 'just now' and not 10 mins ago, 1 day ago, etc.
Here are sample messages response from my api:

{
    "id": "15",
    "text": "Super USer test",
    "createdAt": "2024-05-03T17:45:48.837Z",
    "user": {
      "id": "2",
      "name": "[email protected]"
    }
  },
  {
    "id": "16",
    "text": "Data entry TEst",
    "createdAt": "2024-05-04T15:45:55.874Z",
    "user": {
      "id": "4",
      "name": "[email protected]"
    }
  },
  {
    "id": "17",
    "text": "Super User test",
    "createdAt": "2024-05-05T11:47:07.884Z",
    "user": {
      "id": "3",
      "name": "[email protected]"
    }
  },

And this how the front end looks:

Screenshot 2024-05-04 at 9 12 08 PM

Let me know if I'm missing anything or how the time ago function runs for createdAt field. Thanks!

How do I change the background color of a MessageList

I have a component structured approximately like so:

import {
    MainContainer,
    MessageInput,
    MessageContainer,
    MessageHeader,
    MessageList,
} from "@minchat/react-chat-ui";

function Home()
{
return <MainContainer><MessageContainer><MessageHeader /><MessageList messages={[]} /></MessageContainer></MainContainer>
}

I want to change the background color of the MessageList, so that the messages show as white on a red background.

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.