HTML chat
From PsiWiki
xhtml-im support ([JEP 0071]) is currently in progress. Psi is already able to detect and display xhtml-im stanzas.
However, the XHTML support that Qt provides is very restricted. Additionally, the look and feel of the chat window is clearly obsolete. Nowadays some IM clients offer really powerful (and simple at the same time) theming schemas for their chats. A clear example of this is [AdiumX], which [themes for the chat window] are elegant, pretty and simple. And just XHTML & CSS based.
[edit] Target
It is a fact that the chat window needs a renewal. Concerning this change, there are three basic options:
- Leave the chat window as it is - i.e.: text-based chat with colours.
- Create our own chat style, using backgrounds and richtext. This schema could be as simple or as complicated as wanted:
- just with a background;
- with a window background and background for messages;
- window background, message background, headers and message grouping;
- etc.
- Use an html rendering engine and html templates - i.e.: the AdiumX way.
Provided that we do not want to keep the text-based chat, the second option has two main disadvantages: a) it requires a big amount of work (defining the schema, implementing it, creating styles) and b) it would offer a fixed layout.
On the contrary, using an html rendering engine (though it requires also human and time resources) has the main advantage of flexibility. More is to say, if the AdiumX schema is adapted, all the already created artwork can be reused.
Kopete 0.12 added support for AdiumX chat styles. The [schema] consists basically of some HTML file templates, with keywords which are replaced with messages, nicknames and other variables.
For Psi to support AdiumX chat themes, two basic tasks are to be completed:
- Create or adapt an existing HTML render engine as library;
- Create or adapt the code for the Styles.
[edit] Qt4.4 QtWebKit HTML renderer
[QtWebKit] provides facilities for rendering of HTML, XHTML and SVG documents, styled using CSS and scripted with JavaScript.
It's the same engine that is used by Safari.
It is a part of Qt4.4 (currently Technical Preview 1) so Psi won't need kdelibs nor other external library.
QtWebkit will be used as HTML chat rendering engine. Further information shall be added to this design page, to keep the an up-to-date information of the status of HTML support in Psi.
