[drupal-devel] [bug] Signature "interrupts" typing comments due to existence in text field

irwin drupal-devel at drupal.org
Fri Feb 4 05:50:44 UTC 2005


 Project:      Drupal
 Version:      cvs
 Component:    comment.module
 Category:     bug reports
-Priority:     normal
+Priority:     minor
 Assigned to:  Anonymous
 Reported by:  irwin
 Updated by:   irwin
 Status:       patch

Reducing severity to "minor" because that's what it is.


irwin



Previous comments:
------------------------------------------------------------------------

February 3, 2005 - 23:47 : irwin

In the Drupal comments/ signature system, there is a usability problem
with the signature.
The main problem is that, when adding a comment, the signature appears
in the same line as the textarea that you are writing the content of
your post.  When you begin typing, your new text actually appears AFTER
the signature (at least in Konqueror 3.2).
This makes it incredibly annoying for users because you have to go to
the beginning of the textarea before you can type your data.
A corrolary to this problem is that, when quoting (using the quote
module), the signature is included by default in the quote, which
should not be the default behaviour.
It appears that the signature is being added to the actual body text of
the comment, as opposed to being retrieved from the user's profile when
the page is rendered.
--
>From an engineering/design perspective, one possible way to fix this is
instead of adding the signature text to the comment, instead retrieve
the signature dynamically from the user's profile when the page is
rendered.  If you do this, not only do you avoid the above problems,
but you also improve the flexibility of signatures (for example,
changing it once will cause the signature to change in every comment
you make).  You can also use this design change to give the users a
choice of when to display their signature (for example, by using a
checkbox on the node that says, "Display your signature with this
post").
--
Thank you.


------------------------------------------------------------------------

February 4, 2005 - 00:49 : irwin

Attachment: http://drupal.org/files/issues/signature_load_on_render-20050204.patch (1.62 KB)

Included: patch.
Changes explanation:
"theme_comment_form": the code to autoinsert the signature into the
textarea is removed.
"theme_comment_view": code added to insert signature at the end of the
$comment->comment data structure.  I encase the comment in [p
class="signature"] [/p] (with the correct brackets of course) so that a
CSS theme can change the appearance of signatures.
Caveat: the sig still appears in the [div class="body"] of the comment
theme.
Added function _comment_get_signature($uid), which gets a signature,
given a user ID.
Caveat: this requires an additional query to the "users" table with
every user comment.
Tested with:
- User without signature
- User with signature
- Anonymous poster
- Previewing
- Positng
- Editing a signature: expected result is that all signatures are
changed to reflect the new signature.
Please let me know of any problems.


-- 
View: http://drupal.org/node/16726
Edit: http://drupal.org/project/comments/add/16726





More information about the drupal-devel mailing list