[WebODF] List editing in WebODF ready for review

Satvik Kumar S.Kumar at qsrinternational.com
Tue Aug 26 06:09:14 CEST 2014


Hi All,

Has taken some time but the initial cut of list editing functionality in WebODF is ready to be reviewed on GitHub. This can be found here https://github.com/kogmbh/WebODF/pull/674 .

This is not at the level of functionality provided by something like LibreOffice but is the first part of a set of patches to come and delivering this way makes it easier to review as well.
There are three operations added and one controller to co-ordinate the list related operations. These operations are:

OpAddList
Takes a range which is the set of paragraphs to convert into a list.
A style name to apply to the created list.

OpRemoveList
Takes a coordinate specifying the first step in the list.
Only to be used on top level list elements and not nested lists.

OpAddListStyle
Adds a list style to the document

What is implemented in the PR is two additional UI buttons to toggle numbered and bulleted lists on the current selection. One can select a range of paragraphs and then press either of the buttons to transform that into a numbered or bulleted list. You can also select an existing list in the document and convert it back to the paragraphs in the list. What isn't supported is selecting part of an existing list and changing the list level of those list items. You also cannot have selection that intersects an existing list and non-list paragraphs and then hit the toggle button to merge the selection into a single list. Using the toggle buttons will also add the styles for numbered/bulleted into the document if they don't exist. These default styles have been based off the styles created by LibreOffice for the same buttons in their editor.

The add and remove operation coordinates are always required to be the first step in the paragraph. This is to allow any operation transform logic to be able to easily find the bounds of the operation and I believe is used by other operations that work on the paragraph level.

As mentioned this is the first part of functionality to come. In this PR there are some TODOs sprinkled around that I aim to solve in the future. The plan from my end is that my next delivery will involve adding two more operations which will merge and split top level lists and also update the controller to take advantage of these operations to enable the more complex selection use cases. These two operations will also allow us to plug most of the remaining unresolved conflicts for collaborative editing of lists.

The final delivery I hope to make is to add support for keyboard shortcuts for list editing similar to LibreOffice and additional operations to promote and demote the list level of items in a list. This will enable the creation and editing of basic hierarchical lists in WebODF and rounds out the basic list editing functionality.

Regards,
Satvik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://open.nlnet.nl/pipermail/webodf/attachments/20140826/c20478b2/attachment.html>


More information about the WebODF mailing list