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

display time #416

Open
msslava opened this issue Dec 13, 2014 · 7 comments
Open

display time #416

msslava opened this issue Dec 13, 2014 · 7 comments

Comments

@msslava
Copy link

msslava commented Dec 13, 2014

By default, the post is displayed as "x" days ago.
How to make that time was such 12.12.2014 HH: mm: ss?
Very inconvenient to count the days ago when you need to find out the exact date of the post.
As a suggestion: can add a date separator messages?

@scouttyg
Copy link
Member

What we might do is add a hover ability to a date (similar to what Github does) so that way you can see the exact "time" something was posted by hovering over a date with an unspecified time (ie, the x days ago you are talking about)

@msslava
Copy link
Author

msslava commented Dec 13, 2014

It would be cool if you could do both at the githab!

@scouttyg
Copy link
Member

Just pushed up a small fix to help with this. Not sure what you mean by date separator messages though -- let me know more in depth and we can perhaps add this as well.

@msslava
Copy link
Author

msslava commented Dec 14, 2014

Thank you for the quick response! It works.

Not sure what you mean by date separator messages though

for example:
example
Thank you!

@scouttyg
Copy link
Member

This might take a few days and be put on the backburner, because it's slightly more complicated.

Right now, we loop through the activities as follows:

    if @channel.activities
      for activity in @channel.activities.models
        activityView = new Kandan.Views.ShowActivity({activity: activity, state: Kandan.Helpers.Activities.HISTORY_STATE})
        $(@el).append(activityView.render().el)

Basically, a simple for loop that appends each activity event to the dom.

In order to have date separators, we'd need to create a hash grouped by days so that way after each grouping we could list the date separator. While not that big a deal (basically @activities.group_by(&:date), there'd have to be logic to make sure it grouped it correctly based on your time zone, and also append the date correctly to the view.

It's not really hard, but it would take a bit more thought than just adding the same time formatted differently as a hover.

I'll added it to our list, so look out for it maybe a few weeks from now.

@msslava
Copy link
Author

msslava commented Dec 15, 2014

Great news! Thank you!

@miurahr
Copy link
Contributor

miurahr commented May 28, 2015

👍 Now I'm waiting a progress for date separator.

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

No branches or pull requests

3 participants