lml / commontator

A Rails engine for comments
MIT License
353 stars 99 forks source link

Always Show Create Comment Form #45

Closed JMKelley closed 9 years ago

JMKelley commented 9 years ago

Love the gem.

But currently there is no option to show the 'add comment form' automatically when the page loads. Always have to click 'New Comment' to fetch the form, would love it if there was a config option to do this.

At the moment after digging around in the files I've had to do a botch job of copying the HTML there and displaying it on the page without commontator running it.

Dantemss commented 9 years ago

You should be able to do this with just CSS. The default is:

.thread_new_comment {
  display: none;
}

.thread_new_comment_link {
  display: block;
}

Swap those and you should be good.

JMKelley commented 9 years ago

I will try this out - thanks!

Few notes

After close inspection, it looks like it's dynamically inserting the Div when you click "new comment", would the fix you suggested automatically display the div?

Thanks again!

On Monday, October 20, 2014, Dantemss notifications@github.com wrote:

You should be able to do this with just CSS. The default is:

.thread_new_comment { display: none;} .thread_new_comment_link { display: block;}

Swap those and you should be good.

— Reply to this email directly or view it on GitHub https://github.com/lml/commontator/issues/45#issuecomment-59768241.

Dantemss commented 9 years ago

Oh you are right. Although the div is there, it has no content until comments/new.js.erb runs.

I guess I'll add a config for that on the next version.

JMKelley commented 9 years ago

Brilliant - thanks a lot! Any eta? Love the gem and don't want to switch it out!

Keep up the great work.

On Monday, October 20, 2014, Dantemss notifications@github.com wrote:

Oh you are right. Although the div is there, it has no content until comments/new.js.erb runs.

I guess I'll add a config for that on the next version.

— Reply to this email directly or view it on GitHub https://github.com/lml/commontator/issues/45#issuecomment-59772463.

Dantemss commented 9 years ago

Most likely tonight.

JMKelley commented 9 years ago

Brilliant - thanks again!

On Monday, October 20, 2014, Dantemss notifications@github.com wrote:

Most likely tonight.

— Reply to this email directly or view it on GitHub https://github.com/lml/commontator/issues/45#issuecomment-59778712.

Dantemss commented 9 years ago

Just released version 4.9.0. Give it a try (make sure to reset any style and view changes done to Commontator).

Dantemss commented 9 years ago

Oh and I forgot to tell you: there's a new option called new_comment_style that you can specify in the config file.

JMKelley commented 9 years ago

Thanks a lot for this - it's much appreciated!

On Tuesday, October 21, 2014, Dantemss notifications@github.com wrote:

Oh and I forgot to tell you: there's a new option called new_comment_style that you can specify in the config file.

— Reply to this email directly or view it on GitHub https://github.com/lml/commontator/issues/45#issuecomment-59972554.