G-Comments: "Submit" disappears when writing long answer

63 views
Skip to first unread message

Surya

unread,
Mar 3, 2018, 11:26:13 AM3/3/18
to TiddlyWiki
Hello,

I implemented G-Comments with the plugin from TWaddle (http://gcomments.tiddlyspot.com/).
It works, everything is fine.
But, it is almost useless for me, because when people want to write a longer comment, the "Submit"-Button disappears.
I am sure, that people who want to write a comment on my site, they'll want to write longer comments.

I tried, if hitting enter on the keyboard has the submit-function- but it hasn't. It adds only a new line.

I found, that TWaddle itself has a perfect google-form, where the submit-button doesn't disappear (https://docs.google.com/forms/d/e/1FAIpQLScqeLpT-ZPEyJfQVoX2KB3Q-F1AIq8iJEQd_BqIISdUqA_GrQ/viewform?entry.2087188739=$%28tid%29$&entry.507569536).

But I couldn't find out how to build this.
How can I solve that??

Please help- thank you!
Surya

Mat

unread,
Mar 4, 2018, 11:50:21 AM3/4/18
to TiddlyWiki
Hi Surya! It was a while ago that i fiddled with this, and google have changed the forms layout a tad - but the height of the iframe (because the question is a clipped iframe) is found in:

$:/_TWaddle/plugins/GComment

...you can find the size of the iframe specified close to bottom in that tiddler. Change it into e.g 600px - but note that you'll then also have to style the popup size to accomodate it, i.e the tiddler

$:/_TWaddle/GComments/Stylesheet

perhaps like so

.gcom_form {position: absolute; left: -30px; top: -350px; clip:rect(370px 400px 550px 40px); overflow:hidden; display:inline-block;border:0px solid yellow;}

The proper way to do this would probably be to remake it so that the iframe and the clip:rect (and probably also the gcom_heightfiller style) all fetch the same value from a macro. And of course I should just overall package this into a plugin.. and perhaps remake the config tiddler to accommodate for a user defined comment height. But note that iframes can unfortunately not automatically expand as their content expands, like the text field therein does! So a long enough comment will always push the submit button out of boundry! Making the clipped area be a long strip to begin with will also expose the form content below the button.

If I were to remake this I'd probably experiment with making the popup invisible (i.e its border and background) and instead try to style the iframe itself. This might allow for better control so that it is only the iframe size that sets the outer limits rather than the iframe+popup.

Hope this helps.

<:-)

Surya

unread,
Mar 4, 2018, 2:31:31 PM3/4/18
to TiddlyWiki
Yeah :-))

Thanks Mat!!
Now, hoping for visitors of my site... ;-) They can send me quite long answers (nearly 1500 characters).

I have it now like this:
In $:/_TWaddle/plugins/GComment:
<iframe src=<<googtid>> scrolling="no" frameborder="1px" overflow="hidden" overflow-y="scroll" width="500px" height="5000px" >Loading iframe...</iframe>

And in $:/_TWaddle/GComments/Stylesheet
.gcom_form {position: absolute; left: -30px; top: -350px; clip:rect(320px 380px 1300px 40px); overflow:hidden; display:inline-block;border:0px solid yellow;}
.gcom_heightfiller {height:11em;}

The numbers seem to be really extreme compared to what you suggested... Maybe you find something to make it even better or to avoid, that something gets broken with this like I made it.

It seems that it doesn't make an effect changing the
heightfiller {height:11em;}. I tried it with 2em until 15em- but no difference.
And I couldn't change the width. Also nothing there made any difference.


Like it is now, it doesn't look beautiful. But it works and reaches my goal for 99% (still missing the automatically expanding for xxl-texts. But it is okay like this now!).

Thanks a lot to you!
Surya
Reply all
Reply to author
Forward
0 new messages