Context Menu Concept

OpenOffice.org 2.0

Document - ID	Specification Owner	Last Change	Status
	Matthias Müller-Prove	08/10/2005	final
Conforms to	
Applies to	all modules, i.e. Writer, Calc, Draw, Impress
Task ID(s)	EaseOfUse-MMP-06, 111370, i20330, i30806
Category	Feature

Abstract

The context for the menu items of context menus is defined by the position of the mouse cursor, rather than the current selection. Therefore the a context click causes the selection to jump to the cursor position.
Context menus now do also open on context mouse button down rather than just on context mouse button up. This is to conform to the GNOME platform.
Finally, if the context menu opens for the reason of spell checking it is now granted that the menu does not cover the word in question.

i-Team Members

	Name	E-mail Address
User Experience	Matthias Müller-Prove /MMP	mprove@sun.com
Development	Oliver Specht /OS	Oliver.Specht@sun.com
Quality Assurance	Eric Savary /ES	Eric.Savary@sun.com
Documentation	Uwe Fischer /UFI	Uwe.Fischer@sun.com
		mail to iteam

Approved for Implementation

	Approved by	Date
User Experience	n/a	n/a
Development	OS	08/15/03
	OS & Stephan Schäfer	22.04.04
Quality Assurance	Oliver Craemer	23.04.04
	Eric Savary	23.04.04
Documentation	Uwe Fischer	19.04.04
String Review	n/a	n/a

Document Change History

Rev. Level	Change	Initials	Date
draft	working draft	MMP	08/03/03
	reviewed: 7Notes: UFI-1	UFI	08/12/03
	reviewed: 7Notes: CJ-1 to CJ-4	CJ	08/15/03
	reviewed: 7Notes: FS-2 to FS-6	FS	08/19/03
	reviewed: 7Notes: US-1	US	08/19/03
	adopted new spec template	MMP	09/10/03
	OS-1 and NN-1	MMP	09.10.03
	new section 6.2.2Column and Row Headers in Calc	MMP/NN	06.11.03
	6.3 When to open a context menu 6.4 Spellchecking 6.7 Time Out	MMP	17.03.04
	review and comments by UFI	UFI	03/18/04
	new terms for Glossary 6.3 When to Open a Context Menu?: support for click and click-move behavior 6.4 Position of Context Menu for Spell Checking: position of context menu request for approval	MMP	19.04.04
	6.6 Accessibility: Selection does not change if keyboard is used to open context menu.	MMP	20.04.04
1.0	5.1MS Office XP, Excel and OC-1: text in cells can contain one hyperlink at most. Future Issue: OC-2 spec is final	MMP	23.04.04
	clarification for 6.4Position of Context Menu for Spell Checking. The word should not be selected.	MMP	28.06.04
	New comment CG-1 by Christian Guenther	MMP	26.07.04

Contents

Glossary	4

1	Motivation	4

2	User Scenarios	4

2.1	How does this feature meet the requirements	4

3	Goals	5

4	Requirements and Dependencies	5

4.1	Requirements	5

4.2	Technical Dependencies	5

5	Competitive Analyses	5

5.1	MS Office XP	5

5.2	GNOME	6

6	Detailed Specification	6

6.1	Context Menu for Content Area	6

6.2	Special Content Areas	6

6.3	When to Open a Context Menu?	7

6.4	Position of Context Menu for Spell Checking	7

6.5	Window Behavior	8

6.6	Accessibility	8

6.7	G11n	8

6.8	Error Conditions	8

7	Future Tasks	8

8	Notes	8

8.1	Addressed Issues	8

9	References	11

Glossary

Term	Description
context mouse button	the secondary mouse button. For standard right handed usage of the mouse this is the same as the right mouse button.
standard mouse button	the primary mouse button. For standard right handed usage of the mouse this is the same as the left mouse button.
mouse-click	a click with the standard mouse button
context-click	a click with the context mouse button
content area	a region of a document window that can contain one selection at most. (cf. 6.1Context Menu for Content Area for detailed definition and some examples)

Motivation

The behavior of OpenOffice.org 1.1 and former versions does not conform to HCI guidelines in this area, and therefore does not meet the user expectations.

User Scenarios

Scenario 1 – Edit Paragraph Style in Writer

The user provokes the context menu for a special heading in order to edit the paragraph style. After changing the style a different paragraph changes its appearance. – Reason: that other paragraph contained the text cursor when the context menu was used to change the style of the paragraph where the click occurred.

Scenario 2 – Hyperlinks in Writer

IssueZilla i9698:

I've tried to remove a hyperlink using the context menu. It didn't worked until I moved the cursor in the hyperlink ( took me a while to figure this out ). When context-clicking without any text selected, wouldn't be better if OOo will consider what has been context-clicked instead of current cursor position?

Scenario 4 – Images in Writer

Images have to be selected before the context menu shows menu items related to the image.

Scenario 5 – Hide Rows/Columns in Calc

The user uses the context menu to hide a column. But another column disappears?? Reason is the mismatch between the selected cell (somewhere) and the mouse position for my context menu on the column header control.

How does this feature meet the requirements

By changing the selection before the context menu shows up the user gets the perception that the context is defined by the position of the mouse.

The scenarios above are treated in a new way,

Scenario 1 – Edit Paragraph Style in Writer

The user provokes the context menu for a special heading in order to edit the paragraph style. Before the context menu opens the text cursor is moved to the character under the mouse cursor within the heading. The command Edit Paragraph Style works on the very same heading.

Scenario 2 – Hyperlinks in Writer

A context click to a hyperlink sets the text cursor into the hyperlink without performing the jump. The context menu offers the command Default to remove the hyperlink.

Scenario 4 – Images in Writer

Images are automatically selected before the context menu shows the commands for an image.

Scenario 5 – Hide Rows/Columns in Calc

Rows and columns are selected before the context menu shows the commands. It is clear what rows and columns are affected by the command.

Goals

Pick the context for context menus from the cursor position, rather than from the current selection. Given this objective the selection of scenarioss in chapter 4User Scenarios should no longer confuse the user.

Requirements and Dependencies

Requirements

The context menu interaction should conform to the platform conventions of Gnome and Windows. It should also meet the user's expectations.

Technical Dependencies

<Are there any technical dependencies for this feature? Does the implementation of this feature create any technical dependencies to other program parts? Or very important any issues for automatedd GUI Testing?>

Competitive Analyses

MS Office XP

When to open a context menu?

Some context menus open on mouse-down (e.g. context clicks to customize toolbars), other open on mouse-up (e.g. text formatting). In the latter case it is also the mouse-up location of the mouse that is used to display the context menu. A different position between context mouse button down and context mouse button up is not evaluated.

MS Excel

If a cell in MS Excel contains text, the text can contain one hyperlink at most. A context click to any location in the cell triggers the hyperlink context for the context menu.

GNOME

In GNOME context menus are supposed to open on context-button-down – the same as for drop-down menus.

Detailed Specification

Context Menu for Content Area

Content Area

A content area is a region that can contain one selection at most. E.g. the text area of a Writer document forms a content area. A spreadsheet typically contains more than one content area, i.e. each sheet is a separate content area. The slide controls in Impress are a content area because one of the slides is selected. The toolbars can contain their own content area and even each combo box is a content area for itself.

The notion of a content area is important because it matters for the current selection and cursor position if the mouse click happens within the same content area where the selection or cursor position resides.

The following 3 sections describe the behavior for context menu and selection, or cursor position respectively, for one content area. If the context menu should be opened in a different content area then the selection of that area has to be considered. All other selections in other content areas remain unchained.

No Prior Selection

Given the content area contains no selection or just a text cursor and the context menu is activated on a mouse position Mpos then two operation happen. First, a virtual mouse click action is performed at Mpos to select the object or to move the cursor to the position Mpos. And second, the context menu opens with the options relevant for the current selection or cursor position.

A virtual mouse click is just used to change the selection. It does not perform any associated actions like clicking a hyperlink, even if this is the default action for a given piece of text.

Mouse Position not in Selection

Given the content area contains a selection S and the context menu is activated on a mouse position Mpo that is not within the boundaries of the selection (Mpo  S) then two operation happen. First, a virtual mouse click action is performed at Mpos to select the object or to move the cursor to the position Mpos – the prior selection is removed in this moment. And second, the context menu opens with the options relevant for the current selection or cursor position.

Mouse Position in Selection

Given the content area contains a selection S and the context menu is activated on a mouse position Mpos that is within the boundaries of the selection (Mpo  S) then the context menu opens with the options that are relevant for the selection. The selection S remains unchanged.

Please note that some objects cannot be selected. Toolbars are not selectable, though they have special command for their context menus.

Special Content Areas

Sheet Control in Impress and Calc

The slides control in OOo 1.1 Impress is a content area. A context menu on a deactive slide tab activates the slide before the context menu is displayed. By doing this the command Rename Slide gets an unambiguous target object.

OOo Calc uses the same user interface idiom. Tabs are used to select sheets. A context click should first activate the sheet and then reveal the context menu.

Illustration 1 This Slides Control in OOo 1.1 Impress contains tabs for "Slide 1" and "Slide 2".

Column and Row Headers in Calc

When the context menu for a row header is opened, the mouse position is interpreted to be in the selection if the row at the mouse position, or parts of it, were previously selected. In that case, the selection isn't changed, so it's possible that still only parts of the row at the mouse position are selected. In any case, the context menu that's shown will be that of the row headers, with the row functions. If nothing was selected (only the cell cursor shown), the row at the mouse position will be selected.

The same applies to columns in a column header.

When to Open a Context Menu?

If a context menu opens after mouse-down (pressing the context mouse button and keep it pressed) and before mouse-up (release the context mouse button) the user can navigate directly to the menu items of the context menu. This behavior is preferred over an interaction model where the context menu opens after mouse-up.

If the context mouse button is pressed and released the context menu opens as well.

This gives context menus the same interaction behavior as regular menus. Menus open with a mouse click (down&up) to the menu bar and stay open until the user clicks a menu item or click somewhere outside the menu. Menus also open after the mouse button is pressed (just down). Then the user can move the mouse pointer to the desired menu item (mouse button still pressed) and release the mouse button at the menu item to choose it.

Position of Context Menu for Spell Checking

For spell checking it is important that the context menu does not cover the missspelled word. Therefore the top of the context menu is at the bottom of the current text line. The following two tables specify the position of the context menu for left-to-right and right-to-left user interfaces. Case 2 is applicable if the space between the selection and the lower border of the screen is too small to display the entire context menu.

LTR UI	left position of context menu	top position of context menu
case 1 (default)	MINIMUM (mouse cursor, right screen border minus width of context menu)	bottom of selection
case 2 (not enough space between selection and lower screen border)	MINIMUM (mouse cursor, right screen border minus width of context menu)	top of row that contains the current selection minus context menu height to the top

RTL UI	left position of context menu	top position of context menu
case 1 (default)	MAXIMIM (mouse cursor – width of context menu, left screen border plus width of context menu)	bottom of selection
case 2 (not enough space between selection and lower screen border)	MAXIMIM (mouse cursor – width of context menu, left screen border plus width of context menu)	top of row that contains the current selection minus context menu height to the top

This applies to all OOo modules.

The general selection schema applies to spellchecked words as well, i.e. a misspelled word does not get selected if the context menu opens. (i30806)

Window Behavior

If the context click occurs in a content area of a deactive window the window is activated before proceeding with the context click. The same is true for tool windows.

Accessibility

A context menu can be opened by a keyboard shortcut, too. In this case the selection is not changed. The context is defined by the current selection that contains the focus.

Key Board Shortcuts

Shortcut	Description
Shift+F10	opens the context menu for the currently selected item

G11n

Context menus for RTL user interfaces open to the left of the mouse cursor rather than to the right.

Error Conditions

Time out

If the virtual click causes a long operation – e.g. the display of a new slide in Impress with media object that are to be loaded from the internet – then the context menu operation is aborted after ca. 3 sec. at max. In this case the context click is treated as a regular click. (Note: US-1)

Future Tasks

i21701

a table of contents within a table in Writer; the context menu displays options for the table, rather than for the table of contents.

i53149

Context menu commands for hyperlinks need to be improved.

i53150

MMP-2: image + caption :: do we anchor the image within the frame or do we anchor the frame (that contains image and caption)?

i53153

OC-2: Calc: A context click to an hyperlink in an unselected cell should 1) select the cell, 2) activate the text edit mode for the cell, 3) set the text cursor to the hyperlink and 4) display the context menu with the commands for hyperlinks.

i53156

all context menus need to be reviewed.

i53155

CG-1: The mouse sensitive context menu is problematic with objects without filling and text objects.
To open the context menu of objects without filling I must click on the border of the object. Clicking on the object deselect the object (or doesn't work when the object is not selected)
To open the context menu of text objects change the object into the editmode and shows the context menu of the text and not on the object. To open the context menu of the object I must click on the border of the textobject.

Notes

Addressed Issues

CJ – 1 Bitte noch auf Accessibility eingehen.

FS-6: The behavior for opening a CM using the keyboard is completely irrelevant in the scope of the spec, nevertheless, I think the spec shouldn't suggest (as it currently does) that the mouse is the only possibility to open a CM :)

MMP: cf. 6.6Accessibility

CJ – 4 Ändern sich die Kontextmenü-Positionen?

not the scope of this spec

LHO-1 proposal: For spellchecking context menus make sure that the menu does not cover the word.

6.4Position of Context Menu for Spell Checking

US-1 Note: 4.3 Error Conditions: What should happen, if a content area could not be loaded during a specified time frame, but the user wishes to display a context menu of it? Time-out and freeing mouse cursor after e.g. 30 seconds?

MMP: consider the case where a new slide take “forever” to load because of broken network or large media on the slide.

##UFI: I'm afraid the user would think this is a bug. Make a context-click behave like a standard click, with the addon bonus of a context menu shown after the mouse-up event. Media objects from the internet are nothing that we should use as an excuse not to implement the expected behavior. Don't construct and invent the worst case scenarios that only one out of thousands of users will encounter when we will disturb all other users by not having an expected feature.

UFI-1 Note: Dabei ist mir noch nicht klar, warum er zu diesem Zweck "virtuelle Mausklickaktionen" einführt. Es würde m.E. reichen, ganz einfach die Selektion auch bei einem Rechtsklick im Dokument zu versetzen, bevor das Kontextmenü geöffnet wird.

A virtual click changes the selection but does not perform the action. This makes it possible to open a context menu for a hyperlink. A standard click would activate the link.

UFI-2 Note ad 5.1MS Office XP: isn't this so by design? Customize toolbars does not change the text cursor [MMP: the selection], so it opens on mouse-down - while formatting a text repositions the text cursor first (on mouse-down), then opens the context menu for that new position on mouse-up. I would strongly suggest to implement it this way in OOo too. Then I could press the context mouse button on the beginning of a word, the text cursor jumps there, then move to the end of the word, text gets selected, then release the context mouse button, context menu for the selected text opens.

If a user clicks somewhere with the standard mouse button we believe in the user and obey this command, position the cursor or select the image and so on. But currently if a user clicks with the context mouse button, we are in a mood to tell her "you can't be serious! you most possibly did not mean to click there! We know it better and will not select/position..." this is plain stupid. Take a context click as serious as a standard click.

MS does not behave as you describe. And we will do so neither. A context-mouse-down & mouse-move is not treated as a special case.

OC-1 comment: Hyperlinks in cells of OOo Calc: Text in a cell in MS Excel can contain one hyperlink at most. Hence a context click to any location in the cell triggers the hyperlink context for the context menu. This is not possible for OOo because cells in Calc can contain text and parts of the text can be hyperlinks.

UFI-2: The Microsoft Style Guide says not to use the term "Context menu" and wants everyone who writes for the end user to use the term "Shortcut menu" instead. What is your opinion? "context" is rarely used in normal language, while "shortcut" may be much more meaningful to the average user.

MMP: I prefer “context menu”. But this specification does not change any terminology.

UFI-3 ad 6.4Position of Context Menu for Spell Checking: do you want to scroll the view if the context menu doesn't fit below the line? Or should it display to the right or left then?

no, in this case the context menu opens to the other side.

FS-2: "Goals/Scenario 1 ­ Edit Paragraph Style in Writer": My first impression was that this chapter talks about editing a heading's paragraph style in the stylist. Later, I saw that this isn't the case, which either suggests I need to update to Brain(TM) 2.0, or the chapter could be re-phrased :)

MMP: pending update to Brain(TM) 2.0

FS-3: "Goals/Use Case 5 ­ Hide Rows/Columns in Calc": This applies to everything which can be triggered via the context menu, e.g. column width and such, so perhaps we can word this more generally here.

A use case is

FS-4: Is a mouse-click the "button down" or the "button up"? :) This is probably academic, but what if I context-click (down), move the mouse while pressing the button, and then release the button in another location? Nor sure if this has any relevance (AFAIK, we currently do not have places where dragging with the context button pressed triggers anything).

.##UFI: see my remark in section 5.1

MMP: It is both. cf. 6.3When to Open a Context Menu?

potentially expensive/disruptive behaviour

FS-1 Note: Darf ich noch zu Protokoll geben, daß man sich in diesem Zusammenhang (vermutlich fall-basiert) Gedanken über das Restaurieren der Selektion machen sollte? Es gibt Szenarien, wo das permanente Umsetzen der Selektion potentiell teuer ist, und es deswegen Sinn macht, sie nach der Ausführung des gewählten Kommandos aus dem Kontextmenü wieder zurückzusetzen. Standard-Beispiel Explorer unter Windows: Kontextmenü im rechten Teil (Datei-Ansicht) ändert die Selektion permanent, Kontextmenü im linken Teil (Verzeichnis-Baum) nur temporär.

FS-5: "Sheet Control in Impress": This is an example for what I'd call "potentially expensive/disruptive behaviour" cf. FS-1:
I think activating a slide may not really be what is desired here. First, I think that switching a slide can be a lot of flickering. Second, and perhaps more important, I think what the user finally wants is *renaming the slide* - what s/he probably doesn't want is that we break his/her workflow with moving away from the slide s/he's currently working on, and displaying another slide.

##UFI: it depends. In the Slide View, the user most certainly will change the properties of the slide she clicks on. If the user context-clicks a slide tab at the bottom left in Drawing View, however, she most certainly only wants to rename that slide. In the latter case it should not be necessary to display that slide as the current one, it may not be desired.

I suggest that in such a situation, the slide is not activated, but only the slide tab is selected, but the selection is *restored* as soon as the context menu is closed.
My favorite example in another product (: The Windows explorer: Selecting an tree item like "Network Neighborhood" can be potentially expensive, because displaying the NN in the right pane takes a while. Additionally, the context menu for NN can be used for adjusting the network settings and such, which in no way is related to actually displaying the NN. In fact, I personally often use the NN context menu for searching for computers or mapping network drives - but in these cases, I definitely do not want to NN to be really displayed. And indeed, MS supports me in this wish :), by only temporary selecting the entry for the duration of the context menu.

MMP: a context click might change the selection. This is only “expensive” if the click occurs outside an complex selection.

CJ – 2 Context menus for OLE-Objects

MMP: any special cases here not covered by this spec?

OS-1: take care for Chart.

MMP: any special cases here not covered by this spec?

References

When good interfaces go crufty. In the Weblog of Matthew Thomas: http://mpt.phrasewise.com/stories/storyReader$374

This word is misspelled by intend.

<Recommended - Describe how this feature will meet expected requirements>

11	Pick Context for Context Menu

Pick Context for Context Menu	11

http://specs.openoffice.org/ui_in_general/menus/Context4ContextMenus.sxw

Matthias Müller-Prove

2004-03-17T19:41:37

Matthias Müller-Prove