prettyComments 1.2
Jul 14
I’ve just updated my prettyComments plugin and made a project page for it (the old post was too dirty for me
)
You can view/test the updated version on this page. Feel free to leave any comment in this post as this will become the main post for the plugin.
Thanks!
Jul 14 at 15:59
[...] Please refer to this post for support/updates on [...]
Jul 15 at 07:12
Hi, that is brilliant, thank you.
Only issue I can see is that to get multiple textareas to work on one page, they must have the same id. This is a problem becuase you should never have two elements with the same id on any page. Is it possible to select the elements by class only?
Thanks again, great work
Jul 15 at 07:32
@Mark Yes, you can use it as a CSS selector, like so prettyComments.init(’#textarea1, .classOnTextAreas’);
Or even prettyComments.init(’textarea’), this will target all textareas.
Thanks!
Jul 15 at 16:24
Great work Stephane. I’ve posted about this on the jQuery mailing list. You should join us there to answer questions about your plugin.
Rey
jQuery Team
Jul 15 at 19:14
@Rey Bango Thanks for your feedback! I joined the mailing list!
Jul 29 at 12:18
To show it off you should make your comments box only a line or two long, so visitors subtly see the cool effect, which may generate more interest….
Thanks,
Jul 31 at 06:41
Perhaps an error, perhaps a bug, but this time with your comments system - I just wrote a VERY long post but when I hit Submit, there was no feedback about whether the post had successfully submitted, it just displays this page, without my comment appearing?! Perhaps this is because you must approve all comments before they appear, but this is a major usability problem, it’s essential to display some sort of confirmation to the user that the comment has been received… I will see if it happens again when I submit this comment.
Jul 31 at 06:44
Ah! This time my comment DID display, with a “Your comment is awaiting moderation” message… that means my previous post was lost (either by design, perhaps there’s a maximum comment length limit? Or is it a bug?) and there was no warning to me about it at all! I could easily have left this page thinking that I’d submitted the post… That’s a *major* problem, please look into it…
Fortunately, I had copied the comment to the clipboard. so will now submit it again in chunks…
Jul 31 at 06:45
Nice idea, but there are a few issues… and I’ve recorded mini videos of them so that you can see what I’m talking about…
1) In IE7 there is often (but not always) a VERY long initialisation, it pretty much hangs the browser for a good 5-10 seconds (and I have a powerful PC), this makes the script unusable to me unfortunately, it affects the user experience too much. But this must be a bug rather than design…
WATCH http://screencast.com/t/IHV6pAJkh
2) In FF3 the text cursor often disappears, this is very disorientating when trying to enter in a significant amount of text and make corrections at various points throughout it.
WATCH http://screencast.com/t/1rjUrL0co
Jul 31 at 06:45
3) In FF3 and IE7 (haven’t tested in other browsers) the text box isn’t quite tall enough to cope with 3 lines of text, it has to expand a few pixels when I reach the third row. I’d like to see this fixed not by you increasing the size of the textbox in your HTML code on the demo page, but by there being an option/function in your script to enlarge each textbox to exactly the right size to fit the desired number of initial lines, so that this expansion happens once during initialisation of the script, not while the third line of text is actually entered.
WATCH http://screencast.com/t/uGpq8fPG5f
4) Then, when I hit enter at the end of the third row I would expect the text box to expand and show the text cursor at the beginning of the new line, but instead I get two sightly different results in FF3 and IE7…
FF3: the cursor has actually moved down to the start of the new line but the text box hasn’t expanded, it only expands once I type the first character. It also contracts if I delete the character. If I hit enter multiple times, it does expand, but it’s always showing one less line than it should (i.e. with the text cursor hidden, on the next line that’s not being displayed)
WATCH http://screencast.com/t/Thqpiit0Sf
IE7: the cursor has moved down (and the text has scrolled up, clipping the top line in a horrible way) but the text box doesn’t expand when I start typing the new line, and still doesn’t expand when I hit enter, it only expands when I type ANOTHER line of text! This really doesn’t work well at all…
WATCH http://screencast.com/t/I13AhXgMX
Jul 31 at 06:46
5) It’s possible to scroll the first line of the box off the top and to not be able to get back to it unless you click in the text and move the text cursor up using the keyboard…
WATCH http://screencast.com/t/fKfTt2K0iEi
6) In writing this long post the textbox has grown to a rather ridiculous length! (see video above) I think it’s important to control this, especially when the box is potentially part of a complex design that could be affected by the size of the textbox once it reaches such a huge length… ideally the textbox should start a certain size, expand until it reaches a limit (specified somehow in a JS call to your script or an attribute of the textbox element which your script automatically applies), then scrollbars should appear to allow further text to be entered. Of course this sequence should reverse (i.e. scrollbars should disappear again) as text is deleted to reduce it below this threshold.
I hope this feedback and videos are useful, do let me know when you’ve addressed these issues and I’ll test again!
Best regards, MarcusT
Jul 31 at 07:42
@MarcusT Thanks a lot for the feedback, this is reaaaally useful. As for the comment submitting problems it has to do with the template I am using. I plan on doing my own templates and should address the issues then.
As for the other issues I’ll definitely look into it. Those screencast really helps!
Thanks again for the useful feedback.
Jul 31 at 09:31
@MarcusT Most of the issues has been solved, here are the details.
1) I cannot reproduce it in my testing environments. I think it might be my server that got slow hanging on javascript.
2) “Fixed”. The bug happens when I animate the textarea, firefox doesn’t seem to like that. I disabled the animation by default. It can be re-enabled but the bug will still be there.
3) It has to do with my layout CSS, I fixed it but since I don’t control the default height, it can occur in your own installation of the script. I also don’t want to control the default height as this is something related to the design and not the script.
4) Fixed!
5) Fixed, was related to #4
6) It’s noted! I only don’t have enough time right now to do this change.
Once again thanks for the feedback!
Jul 31 at 09:57
Great! All seems to work as you say now, and the lack of animation in FF isn’t really a problem, but it would be nice if you could find a way of getting round the problem and putting the animation back…
And do let me know if/when you implement (6)…
Jul 31 at 12:30
@MarcusT I’ve just released an updated version #6 is now implemented!
As for the animation, I did try other things, I’ll have to digg further, seems to be a browser issue.
Aug 01 at 22:16
BUG:
When center aligned, the textbox moves over to the left of it’s container when resizing.
Aug 04 at 12:15
BUG:
Only tested in Opera9.50/PC.
If you hold down the return/enter key, and release it, it will make a scrollbar, and won’t work anymore.
Minor bug: (??)
It won’t stretch to the right.
Would be nice with an option for that.
(And a max-stretch.)
Greetings from Denmark,
- Johan
Aug 05 at 07:42
@Johan Thanks for the feedback, this is indeed a bug that seems to occur in every browsers, I’ll have to look into the issue.
As for the horizontal stretch, that’s not something I plan on implementing as the user exeperience of such feature would be against everything we’re used to.
Thanks for the feed back!
Aug 12 at 13:21
Doesn’t handle keypress events resulting in failure when the enter key is pressed for a long time.
Aug 14 at 02:15
When pasting a large amount of content, the textarea doesn’t expand
Aug 18 at 18:34
@a110y This is indeed a bug, but I doubt I will be able to fix it. I’ll try to find a solution tho.
@Michael Wolfenden This is also a bug, thanks for pointing it to me, I’ll try to find a solution.
Aug 24 at 08:46
I’m trying to recreate the javascript cause i dont want jquery to be included.. from what i see you used jquery for the animation…. can i have the full documentation of the code?
Aug 25 at 17:56
@it2051229 I don’t have any documentation for the code at the moment expect for the comments that are in the uncompressed version. You can find it here http://www.no-margin-for-errors.com/projects/prettyComments/prettyComments_uncompressed.zip
If you don’t want to use jQuery because your fear it might conflict with another library, please note that most of them have some sort of no conflict mode. While it’s not the best way to work it can alway help.
Thanks!