Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add date below the message #42

Open
vkhattar opened this issue Nov 14, 2017 · 5 comments
Open

Add date below the message #42

vkhattar opened this issue Nov 14, 2017 · 5 comments

Comments

@vkhattar
Copy link

Hi I want to know the date when the text is sent, its more of a feature request.
Example) {type: 'text', author: "them", data: { text: "You've got to have a story.", date: "Tue, 25 Jul 2017 22:53:41 GMT" }}

@dharness
Copy link
Owner

That's a good idea @vkhattar -- let's think about the other kinds of dates we might need so we get the names right (eg sent, received, read, etc) and add this as a feature req.

It won't make it into the next version, but it may appear later.

Important to note however, you can have your message objects have whatever fields you want. react-chat-window will just ignore extraneous ones. I want to leave this open because I think the UI should have the option of showing some date indicators, but it's not clear what ones or what that might look like.

@vkhattar
Copy link
Author

I did add something locally, but could not make a pull request as I did not fork it. For now i am just adding the date with the text, it looks ugly but does get the job done.

@eswarasai
Copy link

@dharness -- Any update on this feature? I'm planning to use this library for one of my projects and would require this feature as part of it. If you can guide me through the implementation, I can develop it for you and create a PR too :)

@dharness
Copy link
Owner

I'm pretty swamped, but I'd recommend putting it here:
https://github.com/dharness/react-chat-window/blob/master/src/components/Messages/index.js

@heatherbooker
Copy link
Contributor

I'd like to open this to opinions and suggestions for the design. Should the date appear for every message? Above the bubble, below it, with a time, with the day of week, with relative times (5 minutes ago, yesterday), only at intervals of greater than X time, should there be a break in the convo when it's a new day... there's a lot we need to specify if we want to see this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants