Labs/Bespin/DesignDocs/Collaboration/Colorization

From MozillaWiki
Jump to: navigation, search

Colorization

Colorization seeks to add background colors to Bespin to indicate who edited the text last. Something like etherpad:

Image here

Design Principles

  • The data should piggyback on mobwrite. It would be crazy to have a separate set of polls for synchronizing colors to that synchronizing text.
  • We should not send entire colourization on every poll. For large files that have lots of history, this could be significant. We could calculate the visuals on the client if we send diffs tagged with username

Issues

  • Can we have a good way to apply consistent coloring to a user? If the colour is just a hue/saturation value then it could work on multiple backgrounds. It's going to have to be customizable

Design

  • mobwrite_core adds a bitmap/vector to TextObj and ViewObj denote authorship
  • We alter applyPatches() to keep this up to date
  • We alter generateDiffs() to reflect the changes in a new header
  • The client needs to reflect the patching process in it's side
  • We draw the changes on the screen