This document proposes a new commenting system for MySource Matrix. The system would allow users to leave notes in HTML content to highlight changes or important features to other MySource Matrix Users.
Status: Draft
Key: draft -> approved proposal -> scheduled -> in development -> in testing -> complete -> released
This feature is not scheduled for development
Planned Release Version: 3.10.0 RC1
With the workflow and large amount of users that MySource Matrix allows, it is common for multiple users to have access to and to be editing the content of an asset. At present however, there is no way for these users to communicate to each other areas of importance in this content, so that changes can be made clear, or deletions can be explained. Currently, users can leave notes in html code of the WYSIWYG editor, but this then becomes part of the HTML itself, requiring deletion of the note before it is published on the frontend. This new system would provide a facility for adding comments to the content, that would never be seen on the frontend.
The new Commenting System will be implemented using a new plugin for the WYSIWYG editor. This will keep the code removed from existing functionality, will avoid any changes to the existing code and will keep existing plugin configurations intact.
The development of the "Commenting System" Plugin will allow the addition and deletion of comment fields in html content. These comment fields will be emulated in the html of the editor, by adding a span or div temporarily to the interface. The comment itself would contain, along with the actual comment itself, the user name of its creator, and the date and time it was created. Figure 1 shows an example of an editor containing two comments.
Upon switching to text-mode of the editor(using the view_source button) the span or div will be converted to standard html(<!—Matrix Comment (Contents) -->) comments. This will ensure clarity when editing in this mode, and minimise confusion when editing other spans or divs. The comments will be converted back to the more visually appealling containers when the text mode is exited.
When the contents of the WYSIWYG editor is committed, the comments will still be viewable, but they won’t be printed in the frontend output of the container. This will be achieved through modification of the content_type_wysiwyg asset. The modifications will ensure that these tags are stripped from the html prior to writing its content file. The tags to be stripped from the text will be of the same form as those seen in the text mode described above, and are shown in figure 2.
The addition of comments would be performed by a simple popup window, and the deletion and editing of the comments would be done right in the standard editing interface, with the possibility of some icons being displayed in the comment container to perform these functions.
A button to remove all comments would also be a wise addition in my opinion, as if there are many comments, it could be quite a chore to reduce the content to a clean version.
Additions to both the html-area.css and the wysiwyg.inc files would need to be made so that the style to use for the comment containers is defined, and can be used in the viewing mode(which the CSS file handles) and for the actual editing view(which is defined in wysiwyg.inc).
Apart from this, the only modifications that would need to be made would be to the content_type_wysiwyg class (which need to be made for any plugin additions) so that user preferences for these plugins are handled correctly. This is standard for any new plugin that is added to Mysource Matrix.