Difference between revisions of "User:TJFrazier/Reveal Codes"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Edit Properties: validation and copying)
m (terminology: "properties" -> "attributes")
Line 16: Line 16:
 
* NPC set
 
* NPC set
 
* Embedded numbered markers for each portion. Initially, these will be the section symbol (§) followed by a number, and shown in color (initially, magenta). Eventually, both symbol and color should be user-selectable.
 
* Embedded numbered markers for each portion. Initially, these will be the section symbol (§) followed by a number, and shown in color (initially, magenta). Eventually, both symbol and color should be user-selectable.
* List of properties after the end of the text, labeled with the portion marker, and showing a kind of diff, of the properties that differ from those of the previous portion. The list for the paragraph (Portion 0) will show only properties that are changed by some later portion. Portion 0 may be of zero size. The lists will show the property’s name and new value. (Old value? Old value source?)
+
* List of attributes after the end of the text, labeled with the portion marker, and showing a kind of diff, of the attributes that differ from those of the previous portion. The list for the paragraph (Portion 0) will show only attributes that are changed by some later portion. Portion 0 may be of zero size. The lists will show the attribute’s name and new value. (Old value? Old value source?)
 
===Editing===
 
===Editing===
 
The initial display will be read-only; the user must do any editing in the original window, and  the results must be redisplayed. The initial implementation should redisplay itself whenever its window regains the focus.
 
The initial display will be read-only; the user must do any editing in the original window, and  the results must be redisplayed. The initial implementation should redisplay itself whenever its window regains the focus.
Line 23: Line 23:
 
===Merge Portions===
 
===Merge Portions===
 
The first major planned enhancement is the ability to merge a selected portion with either the previous or following portion, or both.  
 
The first major planned enhancement is the ability to merge a selected portion with either the previous or following portion, or both.  
* Three icons / context-menu items will be provided: Merge Left, Merge Right, and Merge Both.  One or two of these will in general be disabled for any particular portion; for instance, Portion 0 can only be merged to the right. If both previous and next portions have the same properties, all three portions will be merged into one.  
+
* Three icons / context-menu items will be provided: Merge Left, Merge Right, and Merge Both.  One or two of these will in general be disabled for any particular portion; for instance, Portion 0 can only be merged to the right. If both previous and next portions have the same attributes, all three portions will be merged into one.  
* Regardless of the merge direction, the properties of the selected portion will be the ones changed. The normal case is expected to be that the user wants to get rid of a particular portion and its formatting. Since the results will be different for opposite merge directions, this may be confusing to the users. It may be possible to include a toggling button to reverse this effect, that is, to make the selected portion’s properties override the others.
+
* Regardless of the merge direction, the attributes of the selected portion will be the ones changed. The normal case is expected to be that the user wants to get rid of a particular portion and its formatting. Since the results will be different for opposite merge directions, this may be confusing to the users. It may be possible to include a toggling button to reverse this effect, that is, to make the selected portion’s attributes override the others.
 
* This work will be performed on the original text, and the result redisplayed automatically.
 
* This work will be performed on the original text, and the result redisplayed automatically.
 
* The change should be Undo-able in the normal way.
 
* The change should be Undo-able in the normal way.
===Edit Properties===
+
===Edit Attributes===
A second planned enhancement will allow editing (add/delete/change) of individual properties in the portion property lists, subject to validation requirements.  
+
A second planned enhancement will allow editing (add/delete/change) of individual attributes in the portion attribute lists, subject to validation requirements.  
  
It may be possible to finesse the horrendous validation problem by only allowing copying of existing properties / values. This should provide enough functionality; the challenge is to make the copying convenient, probably using context menus.
+
It may be possible to finesse the horrendous validation problem by only allowing copying of existing attributes / values. This should provide enough functionality; the challenge is to make the copying convenient, probably using context menus.
  
 
===Multiple windows===
 
===Multiple windows===
Opening multiple “reveal codes” windows may be desirable, as for comparing the formats of different paragraphs. This should be safe enough, provided that the active window is up to date. Initially, the window will refresh itself any time it regains the focus. Considering the relatively small sections of text being displayed, this should be invisibly fast to the user, and hence suitable as a permanent solution. If not, more sophisticated techniques (listener for changes, marking as invalid) are available.
+
Opening multiple “reveal codes” windows may be desirable, as for comparing the formats of different paragraphs. This should be safe to do, provided that the active window is up to date. Initially, any "reveal codes" window should refresh itself whenever it regains the focus. Considering the relatively small sections of text being displayed, this should be invisibly fast to the user, and hence suitable as a permanent solution. If not, more sophisticated techniques (listener for changes, marking as invalid) are available.

Revision as of 08:13, 15 September 2010

Introduction

This is a preliminary specification. User feedback is welcome, either here, or on the Discussion page.

For understanding the technicalities, Writer/Text_Formatting#Attributes provides a lovely and brief introduction.

Overview

Provide a method in Writer to “reveal codes”, similar to a WordPerfect feature that most users of that Corel product would very much like to have in OO.o.

Implementation

The general method will be to provide an extension, primarily written in Basic, which will evolve as better methods and user feedback become available.

GUI design

The user selects a paragraph, either explicitly or implicitly (the paragraph containing the visual cursor), and invokes the extension (clicks on something). (In the initial implementation, if the user selects multiple paragraphs, only the first one may be displayed.)

Display

The extension opens a new window (new Writer document), showing the text of the selection, with:

  • NPC set
  • Embedded numbered markers for each portion. Initially, these will be the section symbol (§) followed by a number, and shown in color (initially, magenta). Eventually, both symbol and color should be user-selectable.
  • List of attributes after the end of the text, labeled with the portion marker, and showing a kind of diff, of the attributes that differ from those of the previous portion. The list for the paragraph (Portion 0) will show only attributes that are changed by some later portion. Portion 0 may be of zero size. The lists will show the attribute’s name and new value. (Old value? Old value source?)

Editing

The initial display will be read-only; the user must do any editing in the original window, and the results must be redisplayed. The initial implementation should redisplay itself whenever its window regains the focus.

Enhancements

Planned evolution:

Merge Portions

The first major planned enhancement is the ability to merge a selected portion with either the previous or following portion, or both.

  • Three icons / context-menu items will be provided: Merge Left, Merge Right, and Merge Both. One or two of these will in general be disabled for any particular portion; for instance, Portion 0 can only be merged to the right. If both previous and next portions have the same attributes, all three portions will be merged into one.
  • Regardless of the merge direction, the attributes of the selected portion will be the ones changed. The normal case is expected to be that the user wants to get rid of a particular portion and its formatting. Since the results will be different for opposite merge directions, this may be confusing to the users. It may be possible to include a toggling button to reverse this effect, that is, to make the selected portion’s attributes override the others.
  • This work will be performed on the original text, and the result redisplayed automatically.
  • The change should be Undo-able in the normal way.

Edit Attributes

A second planned enhancement will allow editing (add/delete/change) of individual attributes in the portion attribute lists, subject to validation requirements.

It may be possible to finesse the horrendous validation problem by only allowing copying of existing attributes / values. This should provide enough functionality; the challenge is to make the copying convenient, probably using context menus.

Multiple windows

Opening multiple “reveal codes” windows may be desirable, as for comparing the formats of different paragraphs. This should be safe to do, provided that the active window is up to date. Initially, any "reveal codes" window should refresh itself whenever it regains the focus. Considering the relatively small sections of text being displayed, this should be invisibly fast to the user, and hence suitable as a permanent solution. If not, more sophisticated techniques (listener for changes, marking as invalid) are available.

Personal tools