Notes2 Design WorkingWithNotes

From Apache OpenOffice Wiki
Revision as of 17:56, 30 April 2009 by TJFrazier (Talk | contribs)

Jump to: navigation, search

< Back to the Notes2 main page

Summary

This page contains information on how to work with Notes. This includes the how OpenOffice.org Writer behaves when a Note is inserted, or the text containing a Note Anchor is altered afterwards.

Rationale

Don't you think working with Notes is necessary to save the planet? To be serious again, this section does not really need a rationale.

Assumptions

tbd

Proposed Designs

Proposal "Inserting a Note" #1 ("SmartAnchor")

The Notes Functionality does provide a Notes Anchor to mark up the text portion which is related to the Notes Data. The kind of Notes Anchor depends on the status of Writer Document text selection when calling the command for inserting the Note.

  • If the document has the focus and no document text is selected, then inserting causes the Notes Anchor to be dependent of the text next to the text cursor...
    • If there is some kind of word or string, then the Notes Anchor Area will contain the whole word. (refer to Examples 1 ... 4)
    • If no reasonable text can be detected next to the cursor, then a simple Note Anchor Point is inserted. (refer to Example 5)
  • If the document has the focus and document text is selected, then inserting a note causes the Notes Anchor Area to span the current selection of the document text. (refer to Example 6)

In the following examples, symbols are used for the representation of other elements:

  • Cursor is represented by |
  • Anchor Area start is represented by >
  • Anchor Area end is represented by <
  • Anchor Point is represented by ^
  • Text selection start is represented by [
  • Text selection end is represented by ]
Example 1: The Notes Anchor Area for the text “This is some phone number 1030/73506|9495” would be “This is some phone number >1030/73506|9495<”.
Example 2: The Notes Anchor Area for the text “This is we|ird, isn't it?” would be “This is >we|ird<, isn't it?”
Example 3: The Notes Anchor Area for the text “This is weird|, isn't it?” would be “This is >weird|<, isn't it?”
Example 4: The Notes Anchor Area for the text “I do not think this is too good ..|.” would be “I do not think this is too good >..|.<”
Example 5 (with whitespaces): The Notes Anchor Area for the text “And then he said       |      nothing at all.”
would be “And then he said       ^|      nothing at all.”.
Example 6: The Notes Anchor for such a selection “This is [some selected] text.” would be “This is >some selected< text.”.

Proposal "Inserting a Note" #2

  • If the document has the focus and no document text is selected, then a simple Note Anchor Point is inserted, similar to Example 5, above.
    • Preserves present behavior. No user relearning is required.
    • Makes no unjustified assumptions about the proper note context.
  • If the document has the focus and document text is selected, then inserting a note causes the Notes Anchor Area to span the current selection of the document text. (refer to Example 6, above)

Proposal "Inserting a Note" #3

Choosing between alternatives #1 and #2 could become highly subjective and fuzzy. It also seems likely that some users will strongly prefer to anchor notes one way, and some another. Please everybody (and avoid useless debate) by providing an option setting, like the following, under Tools > Options > ...(tbd) as a series of radio buttons.

"Anchor notes to:"

  • "Point only" (current behavior, disallow new behavior)
  • "Selected text" (Alternative #2)
  • "SmartAnchor" (Alternative #1)
  • "Word"
  • "Sentence"
  • "Paragraph"

Notes:

  1. Some users love configuration options, while others despise them. The trick to good options design lies in careful and clever choice of defaults, so that the despisers don't have to bother, and the lovers can indulge themselves. The choices should be debated and settled by the despisers, since we lovers will probably change it, anyway.
  2. These options might also appear on some other menu or dialog that deals with notes, along with a check-box control, "Set default".

Proposal "Editing Document Text"

Editing the document text may have influence on the Notes in general. The influence on the Note Anchors are:

  • In general, the Notes Anchors keep their position relative to the document text.
  • The size of the Notes Anchor Area is dependent on the the text it includes. If the user edits the document text, which is included in the Note Anchor Area then the Note Anchor Area will be adapted accordingly.
    • If characters are deleted inside the Note Anchor Area, then the Notes Anchor Area is reduced accordingly. (refer to Example 1)
    • If characters are added inside the Note Anchor Area, then the Notes Anchor Area is expanded accordingly. (refer to Example 2)
    • If the Note Anchor Area is reduced from one character to “zero” characters, then the Note Anchor Area is converted to a Note Anchor Point at the same position.
    • If the Notes Anchor Point is deleted (e.g. by using the backspace key), then the Note is deleted too. (Todo: If necessary, move this point to Deleting notes.)
    • A Note Anchor Point behaves similar to a normal character in the document text. This behavior is similar to the current implementation of the Notes Anchor in OpenOffice.org Writer.
    • Please note: The kind of Notes Anchor cannot be explicitly altered afterwards by the user.
Example 1: If the text “This is woonderful text.” is corrected to “This is wonderful text.”
the Notes Anchor Area “This is >woonderful< text.” would be “This is >wonderful< text.”.
Example 2: If the text “This is wnderful text.” is corrected to “This is wonderful text.”
the Notes Anchor Area “This is >wnderful< text.” would be “This is >wonderful< text.”.

Proposal "Adjusting Anchors"

Working from the bottom up, there is no strong reason to disallow conversions between a Note Anchor Point and a Note Anchor Area. An anchor point probably is (and certainly can be) implemented as an anchor area, with zero length.

Because this should be a fairly rare requirement, an interface like the following should suffice:

  • User selects some text, including a Note Anchor (Point or Area), and additional text as well.
  • User right-clicks to show context menu.
  • Context menu shows added line, "Expand Note Anchor". Selecting this item expands the Anchor (Point or Area) to include all selected text.
  • Optionally, the context menu could show a line, "Notes ->", which would display additional options on hover.

The context menu behavior is triggered by the presence of a Note Anchor in the selected text.

Proposal "Viewing Notes"

(proposal will be provided soon: Note Windows, Note Preview, ...)

If in doubt, draw the Notes elements according to their document text position (document text position: considering the reading direction of the document language)

Selected Design

tbd

Implementation

Please note: Before the proposed behavior can be implemented, it is necessary for us that the document format ODF supports Note Anchor Areas. Until then, we will only be able to support the old behavior of OpenOffice.org Writer (which is not specified here).

Code Changes

tbd

Outstanding Issues

tbd

Personal tools