-
Notifications
You must be signed in to change notification settings - Fork 125
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
2.0 #55
Conversation
I was testing this branch because we need I18n support, and I ran into an issue with PageObserver. It's observing on Do you have any suggestions how to work around that? Or am I doing something wrong? |
@javan yes, this fixes the problem. Thanks! |
Hi there! Thanks so much for this gem. We're using with Rails 5 and it's not working with the new Turbolinks b/c of the |
Hey @brandonhilkert, thanks! I'd like to explore using Other than that, I think this branch is stable for use and could be shipped soon. Just need to polish the docs. |
@javan Sounds good! Branch worked well locally, I'll go with that for now. Curious was Basecamp 3 is using for local time display if it's not this... |
Basecamp 3 is running on #49 and using its own MutationObserver wrapper to process elements: BC.observe 'time[datetime]', (element) ->
LocalTime.updateElement(element) This branch obviates it by incorporating a MutationObserver. We could switch over and just haven't gotten around to it. |
Using this fantastic gem: https://github.com/basecamp/local_time⚠️ Using a pre-release version (which seems quite stable): basecamp/local_time#55
Uncaught TypeError: LocalTime.relativeTimeAgo is not a function |
…orted. Restores IE 9-10 support.
Also fixes handling mutations that replace the entire <body>
@akashaggarwal7, you can create |
Thanks for this! ☮️ |
The branche 2_0 has been deleted and merged basecamp/local_time#55 (comment) It was not possible to build the projet with the gemfile like before.
MutationObserver
instead of listening for various Turbolinks and jQuery eventsLocalTime.process(element)
Todo:
coffee-rails
dependency, bundle compiledlocal-time.js
insteadFixes #54
Fixes #56
Fixes #60
Fixes #63
Fixes #66
Fixes #70
Fixes #71
Closes #49
Closes #50
Closes #53