Attribute setting behaviour

Are you missing a feature? Request its implementation here.
honyk
Posts: 176
Joined: Wed Apr 29, 2009 4:55 pm

Attribute setting behaviour

Post by honyk »

Hello Everyone,

if Attribute pallete is used for setting values of attributes, it is necessary to double click on appropriate row. If given row is left, even if no value is set this attribute is added to the current element.

I would change this behaviour to activate these fields on single mouse click and appropriate attribute wouldn't be added till any value is entered (if the value of attribute would be left empty, no attribute would be added).

If row is selected by cursor keys (up/down), activation could be performed by F2 key.

Just idea.

Jan
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Attribute setting behaviour

Post by sorin_ristache »

Hello,
honyk wrote:I would change this behaviour to activate these fields on single mouse click and appropriate attribute wouldn't be added till any value is entered (if the value of attribute would be left empty, no attribute would be added).
And how would you add an attribute with empty value in an XML document?

A single click only selects the row at the click location and a double click enters editing mode if that table cell is editable. This is the behavior of any table. If you do not want to add or edit the attribute from the table row at the location of the mouse pointer then you should not double click on that row.


Regards,
Sorin
honyk
Posts: 176
Joined: Wed Apr 29, 2009 4:55 pm

Re: Attribute setting behaviour

Post by honyk »

For empty values I would suggest to add new popup menu item 'Add empty attribute value' and the present items 'Add' to change to 'Add new attribute' and 'Remove' to 'Remove attribute value' for the better understanding what each item does. Used attributes would be signalled by bold text as now. This info would be stored before edit and if field would be left empty, it would still store empty attribute value, not remove attribute. This scenario can avoid unintended insertion of empty attributes on unwanted click to random row. Maybe there are other drawbacks, but I can still imagine this.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Attribute setting behaviour

Post by sorin_ristache »

The action Add of the popup menu of the Attributes view adds a new attribute to the current element. By default it is added with empty value, that is if you run the Add action but you do not type a value for the new attribute in the Value column of the table then the attribute is inserted in the document with the empty value. Usually it is added with non empty value, that is after the Add action the user types a non empty value in the Value column.

I think it is more convenient and simple with less actions on the popup menu, that is only the Add action instead of two actions: Add new attribute and Add empty attribute value.


Regards,
Sorin
honyk
Posts: 176
Joined: Wed Apr 29, 2009 4:55 pm

Re: Attribute setting behaviour

Post by honyk »

Our points of view seems to be little different but I hope it is not too offensive from my side. I am DocBook writer so my needs can differ from XML developers. Addition of attributes is useless for my purpose (DTD is given and any attribute addition is causing validity error - it could be even prohibited for DocBook I think), empty attributes are useless and out of DocBook world I think they are also used very rarely so taking care about those is not so crucial for me. Instead, I would be grateful for quick access to editing of attributes and mainly if combobox item have to be selected, the present solution is little uncomfortable. Comboboxes should be collapsed immediately without extra click of collapse button. If only predefined values are allowed, combobox shouldn't be editable, which again may cause validity errors.

Jan
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Attribute setting behaviour

Post by sorin_ristache »

Hello,
honyk wrote:Our points of view seems to be little different but I hope it is not too offensive from my side.
It is not offensive. It helps to improve the functionality of the Attributes view.
honyk wrote:Addition of attributes is useless for my purpose (DTD is given and any attribute addition is causing validity error - it could be even prohibited for DocBook I think), empty attributes are useless and out of DocBook world I think they are also used very rarely so taking care about those is not so crucial for me.
I just wanted to say that table editing works in this way generally in user interfaces: a single click selects a row, a double click enters editing mode on the current table cell. If you want to add a non-empty attribute value just enter editing mode and type the value. This is the usual use case. If you want only to look at the current values just move the selection from one table row to other table row with single mouse clicks or with the arrow keys. If you double click accidentally on a row (which adds that attribute with the empty value in the XML document) just right click and select the Remove action on that table row or run the Undo (Ctrl-Z) action. Does this not sound natural?
honyk wrote:If only predefined values are allowed, combobox shouldn't be editable, which again may cause validity errors.
We will consider this enhancement for a future version.


Regards,
Sorin
Post Reply