GSoC 2011 Undo Redo Proposal

IMPROVEMENT OF THE UNDO/REDO SYSTEM

Naveen Agarwal

naveen dot agarwal011 at gmail dot com ABSTRACT

Scribus currently lacks the full undo/redo functionality into its system. Undo/ redo feature being an important part of the Scribus needs to be fully  functional. This GSOC project aims to improve the current implementation of the Undo/Redo framework, make it fully functional and more  organized. It also aims in creating unit test suites for the undo/redo framework. Depending on the actual progress of the project, the project will extend over creating unit test suites for other part of Scribus.

PROBLEM DESCRIPTION

The Undo and Redo features allow users to easily correct mistakes, as well  as free user to experiment with different routing and data mapping  decisions. The undo/redo framework currently available in the Scribus does not add all the actions into its record. For instance the Story Editor's table lacks the undo/redo functionality. Another problem with current undo framework is that many similar actions are compressed into single Undo action. As in case of polyline creator adding of each line is not considered as individual but is grouped  together into a single action.

IMPLEMENTATION PLAN

The project has been divided into5 main parts:
 * 1) Restructuring of some of the data structures and functions. This  is required to improve the efficiency and to provide a higher level of  abstraction as available in QT4 undo/redo framework. The current system  lacks higher abstraction and needs lot of functions for its working.  After changes in the current framework the current implementations of  the  actions will be updated.
 * 2) Implementing undo for the actions which are not recorded by current framework. Many actions like story editor, level etc. are not recorded by undo framework. This part of the project  will examine all the necessary actions where implementation is lacking and will implement the undo/redo framework for it.
 * 3) Organizing Undo Action history. The  action history is currently not easily accessible for user. To solve  this issue the Action History will be integrated into the undo& redo  toolbar button as been done in MS Word.
 * 4) Unit Test Suites. The project will also focus on  create unit test suites using a combination of automated unit test  framework and manual testing. But as good unit test suites take time to  evolve; this project will aim in creating suites for important parts  first.
 * 5) Bug Fixing, Scrub Code & documentation. Bugs related to undo/redo  currently reported in Scribus BTS will be fixed during the project. Also  the code will arranged properly and proper documentation will be done.

PROJECT DELIVERABLES:

Project will deliver following feature/improvement: TIMELINE
 * 1)      Improved undo/redo framework
 * 2)   Compression system is improved
 * 3)   Higher-level functionality like Qt4’s undo/redo framework
 * 4)   Others (based on the future research )
 * 5)      Adding undo/redo functions to all the actions(commands)
 * 6)   Story Editor
 * 7)   Text Frame
 * 8)   Level Actions
 * 9)   Others (based on the future research and development of new actions)
 * 10)      Action History incorporated into the undo and redo icon in toolbar
 * 11)      Unit test suite for Undo/Redo implementation
 * 12)      Complete Documentation of undo/redo framework and its functionality.
 * 13)      Unit test suite for other parts of the Scribus. (Note: First for the critical parts, if time permits then to other parts also)

10 April - 23 May

During this period I will remain in full touch with Scribus team. I will remain active in the IRC and Mailing List to discuss and finalize on the modifications (if required)  in my plan. Also, I will do research work on the other undo/redo framework especially Callibra. I will also try to submit patches for bugs so that I can get familiar with the Scribus code. 23 -31 May: 1-7 Jun: 8-15 Jun: 16-23 Jun: 23-30 Jun: 1-7 July: 8-15 July: (Mid Term Evaluation) 15-23 July:
 * Research work:
 * Look into the code of other Word processors like Callibra and identify the   efficient areas.
 * Compare the current implementation with Qt4 –Undo/redo framework
 * Identify the areas where efficiency of the framework can be improved.
 * Restructuring some of the data structures, functions of undo/redo framework.
 * Updating the changes of the framework into the current functionality.
 * Identify the Scribus actions that are not recorded by the current Undo/redo Framework
 * Implementing the undo/redo for the identified actions.
 * Implementing the undo/redo for the left -over identified actions.
 * Bug Fixing
 * Unit tests for undo/redo
 * More Unit Tests
 * Scrub code, Documentation
 * Re-implementing Item Action mode.
 * Incorporate the Action history in to the undo toolbar button as available in Microsoft Word.

23-31 July: 1-7 Aug: 8-15 Aug: 15- 21 Aug: Deadline: 22 August AVAILABILITY Pre-GSOC & During GSOC
 * Bug Fixing
 * Unit tests for undo/redo
 * Create Unit Test Suites
 * More Unit Test Suites
 * Scrub code
 * Improve documentation
 * Buffer week for any unpredictable delay.

I will be available on IRC and mailing-list till April 25 as my exams are starting from 1 May. During this period I will remain in touch with the team to discuss the project  and will finalize the details of the project I will resume my work from 15 May. As there will be no classes, I will try to give 35-40 hrs. per week for GSOC. Post-GSOC

I will be part of the Scribus team during and after GSOC period. I will work with the team for the development, bug fixing work. But the number of hours per week will reduce as my academic work will take some time. I will try to devote at least 10-15 hrs. per week after GSOC ends. PARTICIPANT INFORMATION

I am 21 year old student from India. I have been coding in C/C++ since my 12th grade. I have fair amount of knowledge & experience of QT4 and various version control  software like git, svn, bazaar. Recently, I have contributed to the development of randy project [1] (a password card generator) which  is based on C++ & Qt4. Last summer, I did my internship from Persistent System Limited-Goa. During the internship I learned about the software development process, wrote some shell scripts and did testing  work. Since 1st year of my college I have been solving algorithm based problems with C++ as preferred language. CONTACT DETAILS

IRC: wolfpack @irc.freenode.net [1]: https://launchpad.net/randy-qt