Switch to Discourse comments for newer blog posts #3623
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just had a look already locally and the integration seems to already work great regarding sending the messages of the discourse iframe back and forth between the website and the forum ✨
@sivakumar-kailasam Do you have time to spin up a review app for this PR? Thank you 🙏
@jessica-jordan done |
Thanks to @sivakumar-kailasam this can now be tested on https://discourse-test-site.emberjs.com/blog/ I just set up the forum configuration to add the testing site to the list of CORS origins (which is currently preventing the iframe for the comments display to be embedded), but to enable CORS in the first place, we need another configuration update that doesn't seem to be able to be done in the forum admin settings themselves unfortunately. I can keep you posted once I found out who can help with this one to get this live @oskarrough |
hmm, the test link isn't resolving for me:
Was just curious to test this out. |
This works well as tested on the review app: https://ember-website-staging-pr-3623.herokuapp.com/blog/2018/09/28/the-ember-times-issue-66.html. A huge thank you to @mansona who helped with unblocking the issue. This should be good to go after updating the date threshold for displaying the new Discourse comments to today's date |
source/layouts/blog.erb
Outdated
@@ -35,7 +35,7 @@ | |||
</div> | |||
</article> | |||
|
|||
<% if current_article.date > Date.new(2019,1,1) %> | |||
<% if current_article.date > Date.new(2019,0,1) %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should be a 1 because I think Ruby is 1 indexed
for dates? https://ruby-doc.org/stdlib-2.1.9/libdoc/date/rdoc/Date.html#method-c-new
I know nothing about ruby 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, thank you! I was inferring that it's the same in JavaScript - good catch ✨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I thought first too, I was like "Good catch, JS it should be a 0" 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated ✨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works great, thank you for bringing in this change to the blog @oskarrough ✨
Yeea! Happy to see it. Thanks a lot to everyone who helped finish it! |
Please continue discussion here #3270.
(had to open a new PR because I accidently deleted the fork on GitHub)