Monday, July 8, 2013

GSoC: Collaborative text editing in Kate + kde-telepathy: status report No. 2

Read my first status report for a more general introduction on what is happening.

In the last two weeks, I have implemented many shiny new things in kte-collaborative! Here's a short summary of the most prominent ones.





Sharing documents using kde-telepathy


There's a prototype for sharing documents using kde-telepathy now! It will take care of all the connection details automatically and should "just work".
Sharing a document using kde-telepathy
To use this feature, in any application using katepart (and XMLGUI), just click Collaborative ↣ Share document. This will open a dialog which shows all of your available contacts; you can just select one and click "Ok". Telepathy will establish a connection (usually through a proxy server) and will launch an appropriate text editor for the selected contact automatically.
This is currently limited to one connection per contact (which can contain an arbitrary number of documents though -- click "Open file manager" to see them or add new ones) and 1-1 connections. I'm currently working on removing both restrictions.

Publishing whole document trees

The infinote KIO slave, which is responsible for displaying, creating and opening documents, has gained support for uploading files with initial content. Thus, you can now copy a whole directory with documents to the server using e.g. dolphin:
To make documents available for collaborative editing, just copy them to the server using your preferred file manager (e.g. dolphin or konqueror). You can easily open up a file manager displaying the server contents shared with a contact from the "Collaborative" menu in kate.
This of course also works for telepathy-initiated connections.
Then, all connected users can browse the documents and edit them:
Users can then browse documents and open them for editing. A remote user can change a document even if the host of the session doesn't have it opened in his editor -- changes will still be displayed once another user opens the document.

Saving local copies

Another simple, yet useful feature can be found in Collaborative ↣ Save local copy: It will allow you to select a location to save a copy of the document to, and you can then press a shortcut to copy the current contents of the collaborative buffer to that location, without ending the collaborative session (which is what would happen if you would use File ↣ Save as...).

Better text highlighting and notification widgets

The colors used for text background highlighting are now much more sensible, and will also automatically adjust to your colour scheme. The small popup widgets telling which user typed text will behave correctly when the view is scrolled or the widget should be outside the view.
If a user types something outside of the current view, the notification widget moves to the top left (or bottom left) corner now, indicating that the document changed above your current scroll position,and telling what user changed it.
Additionally, there's now a "Clear user highlights" button in the context menu, which allows you to clean up the background highligting if it gets too messy. There's also some useful configuration options now:
The small, but useful configuration dialog of the plugin -- more options to come later :)

KTextEditor buffer interface

I suggested an interface for KTextEditor which is required to get some buffer-related things working correctly (such as replace-tabs on). It is currently pending review.

Next steps

The next step is to get kde-telepathy based connection handling to work correctly with multiple contacts, and also allowing things like "invite contact to session". Once that works, most of the basic functionality is in place, and we can start doing cool extra stuff and stabilization.
Another thing which will need to be tackled soon is handling undo/redo correctly. Akademy will probably be a good opportunity to discuss this.

3 comments:

  1. Wow, this looks really awesome !

    ReplyDelete
  2. That's lengen...wait for it...dary!

    Good luck with the project :)

    ReplyDelete