Bug 197329 - [IRC] Action should be supported better in the UI
Summary: [IRC] Action should be supported better in the UI
Status: CLOSED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.ui (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 1.0.2   Edit
Assignee: Jacek Pospychala CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, contributed, helpwanted
Depends on:
Blocks:
 
Reported: 2007-07-20 15:06 EDT by Chris Aniszczyk CLA
Modified: 2007-08-05 15:54 EDT (History)
2 users (show)

See Also:


Attachments
concept (9.42 KB, patch)
2007-07-26 15:32 EDT, Jacek Pospychala CLA
no flags Details | Diff
final (29.95 KB, patch)
2007-07-27 07:34 EDT, Jacek Pospychala CLA
no flags Details | Diff
test (5.86 KB, application/zip)
2007-07-27 07:59 EDT, Jacek Pospychala CLA
no flags Details
mylyn/context/zip (1.61 KB, application/octet-stream)
2007-07-27 11:08 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Aniszczyk CLA 2007-07-20 15:06:16 EDT
For example, if a user sends an action in IRC like, "/me yawns"

In the UI we get a <user> ACTION yawns

We should style the text like most IRC clients do with italicized text.
Comment 1 Scott Lewis CLA 2007-07-22 20:13:01 EDT
If addressed on bug day we'll include in 1.0.2.  Setting target milestone accordingly
Comment 2 Jacek Pospychala CLA 2007-07-26 10:17:56 EDT
I am addressing this on bugday
Comment 3 Chris Aniszczyk CLA 2007-07-26 10:45:41 EDT
it's yours
Comment 4 Jacek Pospychala CLA 2007-07-26 15:32:55 EDT
Created attachment 74721 [details]
concept

Great! 
So currently messages are received from protocol specific provider, and then put into an abstract form (just Sender+Message) and appended to output window.
I see two ways here:
1. extend current message that travels from provider to view (extend IChatRoomMessage) with fields describing its formatting. (I don't like it)

2. allow custom renderer, that will be set by provider (eg. IRCUI) and sit on top of view, reformatting all output just before it hits StyledText. I like this one more, so I attach an overview. Please take a look at IMessageRenderer. It would process any messages, so eg. replace ACTION with italics. Replace :) with smile, etc. etc
Comment 5 Chris Aniszczyk CLA 2007-07-26 16:54:48 EDT
looking into it, I like your approach. 

Emoticons were on the TODO list.
Comment 6 Chris Aniszczyk CLA 2007-07-26 16:56:35 EDT
Scott, I like this approach. What do you think?

Should we try to push this up to our basic messages view? Emoticons there is on the hit list.
Comment 7 Jacek Pospychala CLA 2007-07-27 07:34:30 EDT
Created attachment 74788 [details]
final

added IMessageRenderer and it's IRC specific implementation that honours ACTIONs. Additionally enabled support for sending ACTIONs by user.
I had to set connection.setColors(true) to be able to distinguish ACTIONs from regular messages, as they diffier only with non-printable chars.

I didn't implemented renderer in MessagesView. It may be next step, if you verify it's all working in IRC.
Comment 8 Jacek Pospychala CLA 2007-07-27 07:59:35 EDT
Created attachment 74790 [details]
test

test that briefly shows how to use IMessageRenderer
Comment 9 Chris Aniszczyk CLA 2007-07-27 11:08:52 EDT
committed to HEAD, made minor changes.

This is a good start for what will be needed in bug 198110.
Comment 10 Chris Aniszczyk CLA 2007-07-27 11:08:55 EDT
Created attachment 74799 [details]
mylyn/context/zip
Comment 11 Scott Lewis CLA 2007-08-05 15:54:46 EDT
Added to IP log.  Closing.