GSoC Final Submission report — Revamp the Customize Dialog

Google Summer of Code 2017 with LibreOffice

This year (2017 summer), I have participated the Google Summer of Code (GSoC) program with the project Revamp the Customization Dialog (of LibreOffice). And this is the work submission report required by Google as part of the final evaluations. I’ll try to provide a short description of what work was done, and what’s left to do.

Overview

The initial proposal was based on that the Tools > Customization dialog of LibreOffice was lacking on supporting means. For instance, it was not possible to search for a particular function. It also had an interface with focus on technical facts rather than the work-flow. With a redesign, the functionality would remain as it was, but updated so that average users would be able to customize their program. Initial mockup is here: https://user-prompt.com/how-to-make-libreoffice-customization-usable/

After the proposal was accepted as a GSoC project, it got attention from different parties (users, UX and UI designers etc.). And after a long and hot discussion, we agreed on a new design (variant 2) because it was offering better accessibility and mouseless navigation. Main goals include:

  • A modern and intuitive design
  • Accessibility
  • User friendliness
  • Ability to search for functions
  • Providing a nice workflow with the well-established two-pane design
  • Fixing/improving the underlying code

Work

First stab

Once the design was settled, I started by developing a search feature for the Functions pane of the Keyboard tab because the search was described as “the killer feature” by the design team. After completing the development of that feature, we agreed on merging it to master branch right away. You may also find the related entry on the LibreOffice 6.0 Release Notes.

New search box in the functions pane of Keyboard Customization dialog

The separation

Then I started preparations for the rest of the revamp. Most of the Customize dialog was implemented in one single file, cfg.cxx, which was more than 5k lines long. It was hard to read/follow/debug and work with, so I separated the two major classes (SvxToolbarConfigPage and SvxMenuConfigPage) into their own source files, and created a helper class (SvxConfigPageHelper) to contain the helper functions which are used by these classes.

The new look

As we now had a cleaner work place (base code to work on), I started converting the UI to the new design. In this process:

  • Elements of the old design were removed from both the .ui file and the .cxx/.hxx files
  • New elements for the new design were added to the .ui file.
  • Menu, Toolbar and Context menu tabs started to resemble the new design

The emergency

In the meantime, I had an emergency surgery, and couldn’t work for a while. And this meant a lot more work to meet the final deadline. I almost failed at some point, but got back on track with support and encouragement of my mentor.

The rest

I started to build up confidence with each patch which got reviewed and merged, and tried to do better with the next patch. With the blink of an eye, I got 19 patches merged into the feature branch created for the project on the official git repo of LibreOffice, and we had a mostly complete new Customize dialog.

The menu tab: Menu tab of the new Customize dialog

The toolbar tab: Toolbar tab of the new Customize dialog

The context menu tab: Context Menu tab of the new Customize dialog

What is done/left?

Done:

  • Menu, Toolbar and Context Menu tabs are adapted to the new design
  • Search feature developed/added to all tabs except the Events tab, which wasn’t part of the initial proposal
  • Almost all widgets are implemented and functioning properly

You may see the new Customize dialog in action:

The Revamped Customization Dialog of LibreOffice - GSoC 2017

You may also download and see it for yourselves (Linux_x86-64_deb): https://drive.google.com/open?id=0B-JvlLHm1-kKcW5xbmR5Q1l3bDg

Left/Future:

  • Ability to assign styles and macros to UI elements will be edded
  • Function and gear buttons proposed by the design will be implemented
  • Keyboard and Events tabs will be converted
  • Bugs arising in the future will be fixed
  1. Implement search feature in the Kayboard tab
  2. Add RemoveEntry method to SvTreeListBox
  3. Use SvTreeListBox’s own method: RemoveEntry
  4. Separate SvxMenuConfigPage from cfg.cxx
  5. Separate SvxToolbarConfigPage from cfg.cxx
  6. Cleanup duplicate functions in cfg.cxx
  7. Add new helper class to cui for SvxConfigPage
  8. Convert UI of Customize Dialog to the new design
  9. Add custom widget class: CommandCategoryListBox
  10. Remove useless if check
  11. Initialize and update Function list box properly
  12. Initialize and update command categories and functions for the Toolbar tab
  13. Implement “Add” button in the Customize dialog
  14. Implement “Remove” button in the Customize dialog
  15. Implement Search/Filter feature in the Customize dialog
  16. Implement “Insert” button in the Customize dialog
  17. Add some exception messages to the removeSettings method
  18. Implement “Reset” button in the Customize dialog
  19. Make toolbar/menu addition/removal functional again in the Customize dialog
  20. Disable the individual reset button for the menubar menus
  21. Make the Modify button functional in the Customize dialog

All of these patches have been reviewed and merged into the feature branch, and the first 7 have also been cherry-picked to master. The rest will be cherry-picked to master alltogether after adding the Styles/Macros to the functions list.

You may also find all of my patches merged to LibreOffice codebase here: https://bit.ly/2ktej2r