Last Comment Bug 764245 - Smilies should have tooltips displaying the untransformed text
: Smilies should have tooltips displaying the untransformed text
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Instant Messaging (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 17.0
Assigned To: Mike Conley (:mconley) - (Needinfo me!)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-12 19:25 PDT by :Mook
Modified: 2012-07-23 13:02 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments
Patch v1 (2.50 KB, patch)
2012-07-19 08:01 PDT, Mike Conley (:mconley) - (Needinfo me!)
no flags Details | Diff | Splinter Review
Patch v2 (2.47 KB, patch)
2012-07-19 10:23 PDT, Mike Conley (:mconley) - (Needinfo me!)
florian: review+
bwinton: approval‑comm‑aurora+
bwinton: approval‑comm‑beta+
Details | Diff | Splinter Review

Description :Mook 2012-06-12 19:25:00 PDT
This is the IM equivalent of bug 234638.
When my mouse hovers over smilies/emoticons, it would be nice to show the original text as a tooltip.  It seems like the images already have a title= attribute, it's just not set up to display them at the moment.

(This was mostly tested against IRC.)
Comment 1 Florian Quèze [:florian] [:flo] 2012-07-19 05:51:24 PDT
If it is of any help, the code handling this in Instantbird is at http://lxr.instantbird.org/instantbird/source/instantbird/content/instantbird.js#63 and Thunderbird already has an equivalent at http://mxr.mozilla.org/comm-central/source/mail/base/content/mailWindow.js#559

So fixing this may just be a matter of adding a correct contenttooltip attribute on new conversation bindings, as the imconversation binding seems to expected it: http://mxr.mozilla.org/comm-central/source/mail/components/im/content/imconversation.xml#26
Comment 2 Mike Conley (:mconley) - (Needinfo me!) 2012-07-19 08:01:58 PDT
Created attachment 643849 [details] [diff] [review]
Patch v1
Comment 3 Florian Quèze [:florian] [:flo] 2012-07-19 09:20:14 PDT
Comment on attachment 643849 [details] [diff] [review]
Patch v1

>diff --git a/mail/components/im/content/chat-messenger-overlay.js b/mail/components/im/content/chat-messenger-overlay.js
>--- a/mail/components/im/content/chat-messenger-overlay.js
>+++ b/mail/components/im/content/chat-messenger-overlay.js
>@@ -535,16 +535,17 @@ var chatHandler = {
>     else if (item.localName == "imconv") {
>       let convDeck = document.getElementById("conversationsDeck");
>       if (!item.convView) {
>         let conv = document.createElement("imconversation");
>         convDeck.appendChild(conv);
>         conv.conv = item.conv;
>         conv.tab = item;
>         conv.setAttribute("contentcontextmenu", "chatConversationContextMenu");
>+        conv.setAttribute("tooltip", "aHTMLTooltip");

Have you tried using the contenttooltip attribute instead of tooltip, so that the tooltip is only applied to the content area, and not the whole conversation binding?
Comment 4 Mike Conley (:mconley) - (Needinfo me!) 2012-07-19 09:50:41 PDT
(In reply to Florian Quèze from comment #3)
> Comment on attachment 643849 [details] [diff] [review]
> Patch v1
> 
> >diff --git a/mail/components/im/content/chat-messenger-overlay.js b/mail/components/im/content/chat-messenger-overlay.js
> >--- a/mail/components/im/content/chat-messenger-overlay.js
> >+++ b/mail/components/im/content/chat-messenger-overlay.js
> >@@ -535,16 +535,17 @@ var chatHandler = {
> >     else if (item.localName == "imconv") {
> >       let convDeck = document.getElementById("conversationsDeck");
> >       if (!item.convView) {
> >         let conv = document.createElement("imconversation");
> >         convDeck.appendChild(conv);
> >         conv.conv = item.conv;
> >         conv.tab = item;
> >         conv.setAttribute("contentcontextmenu", "chatConversationContextMenu");
> >+        conv.setAttribute("tooltip", "aHTMLTooltip");
> 
> Have you tried using the contenttooltip attribute instead of tooltip, so
> that the tooltip is only applied to the content area, and not the whole
> conversation binding?

Yes, but setting this attribute did not seem to have any effect.
Comment 5 Mike Conley (:mconley) - (Needinfo me!) 2012-07-19 10:23:03 PDT
Created attachment 643909 [details] [diff] [review]
Patch v2

Thanks Florian - as you suggested, I've switched to using contenttooltip for imconversations.
Comment 6 Blake Winton (:bwinton) (:☕️) 2012-07-23 11:46:14 PDT
Comment on attachment 643909 [details] [diff] [review]
Patch v2

Yeah, I really think we want to have this on aurora/beta.
Comment 8 Mike Conley (:mconley) - (Needinfo me!) 2012-07-23 13:02:35 PDT
Backed out of comm-beta since we landed on a SeaMonkey relbranch (oops).

Re-landed on comm-beta as: https://hg.mozilla.org/releases/comm-beta/rev/6d8e097e1f9b

Note You need to log in before you can comment on or make changes to this bug.