This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 125700

Summary: non-standard way for saving values
Product: versioncontrol Reporter: Patrick Keegan <pkeegan>
Component: MercurialAssignee: issues@versioncontrol <issues>
Status: RESOLVED FIXED    
Severity: blocker CC: jrojcek, ppis
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Mercurial properties dialog
Subversion Properties dialog
Proposed new dialog
proposed patch
additional patch

Description Patrick Keegan 2008-01-21 18:16:51 UTC
In the Properties dialog, if you change a property, you have to click Modify to persist the change that you have made.
This is inconsistent with the way things are done in the rest of the UI.

Several times in the course of using module, I have made the mistake of not clicking Modify.
Comment 1 Padraig Obriain 2008-01-22 13:35:51 UTC
I think that this dialog is similar to SVN Properties dialog.

I am adding Peter Pis to the cc list for this bug as he has already tested this dialog.
Comment 2 Peter Pis 2008-01-22 14:41:29 UTC
I've implemented the Properties dialog for SVN integration. I wanted to cover the most frequently used scenarios. I am
aware that this dialog is a bit different from other NB dialog. The redesign of Svn properties dialog is on my list for
this release.
Comment 3 Padraig Obriain 2008-01-22 16:23:03 UTC
If we were to change the mercurial Properties dialog, what dialog should we model it on?
Comment 4 Patrick Keegan 2008-01-23 12:00:00 UTC
I can't think of one that would look exactly the same. However, I think the general model is that you enable someone to
make changes and the user's clicking of the OK button is what persists those changes and pressing of Cancel deletes
those changes. I think forcing the users to explicitly press Modify is superfluous
Comment 5 jrojcek 2008-01-24 08:41:04 UTC
I don't have a SVN or Mercurial repository so I cannot check the dialog. But from the issue description I guess it has Modify and Close buttons. Is that correct? 
If you could attach a screenshot, that would be the best.

On other places in the IDE, properties dialogs have OK and Cancel buttons.
Comment 6 Padraig Obriain 2008-01-24 08:51:41 UTC
Created attachment 55475 [details]
Mercurial properties dialog
Comment 7 Padraig Obriain 2008-01-24 08:52:56 UTC
Created attachment 55476 [details]
Subversion Properties dialog
Comment 8 jrojcek 2008-01-24 09:22:06 UTC
Thanks for the screenshots!

For the mercurial dialog, I would suggest to use a similar approach to the Code Templates options panel (Tools > Options > Editor > Code Templates). It 
means a table of properties at the top and "Property Value" text area below the table. No "Modify" button is necessary as the user commits changes by 
clicking the OK button. I'm not sure if it's possible to add/remove properties. If it is, I suggest to use standard "Add/Remove" buttons. If there's a 
predefined set of property names, then the best way would be to use a combo box cell renderer for cells in the name column. It's also possible to avoid the 
"Property Value" text area - in that case each cell in the "Value" column needs a small ellipsis button [...] that brings up a text area in a separate dialog, 
similar to regular property sheets commonly used in NetBeans. That's the best if in majority of cases the values are short enough to fit well into the value 
column so that user needs to click the ellipsis button rarely.

The end result would be a table with Add/Remove buttons in a dialog with OK/Cancel buttons.

For the SVN dialog, I would need an explanation how it works. Peter, please contact me regarding it.
Comment 9 John Rice 2008-01-24 10:02:43 UTC
Created attachment 55479 [details]
Proposed new dialog
Comment 10 John Rice 2008-01-24 10:06:14 UTC
Proposed new Properties dialog attached:

1. Fixed combo box - we have only 3 property values.
2. Clicking on a property in the combo copies value into the Property Value Text field below.
3. You can edit this value: clicking onto another property in the combo box will change this edited value in the combo.
[Same behavior as the Tools > Options > Editor > Code Templates]
4. Clicking OK will persist the changes, Cancel discards them.

This should be a lot simpler to use and understand.
Comment 11 Padraig Obriain 2008-01-24 10:11:03 UTC
The code for the dialog referred to above is at
editor/codetemplates/src/org/netbeans/lib/editor/codetemplates/storage/ui/CodeTemplatesPanel.java
Comment 12 jrojcek 2008-01-24 10:50:04 UTC
I think that would work. The attached layout needs some fine-tuning. Please add an empty border on the right side of the dialog and decrease spacing 
between labels and their components (table, text field). If you use Matisse, it should take care of proper spacing between labels and components AFAIK. 
Thanks.
Comment 13 Padraig Obriain 2008-01-31 08:42:30 UTC
Created attachment 55817 [details]
proposed patch
Comment 14 Padraig Obriain 2008-01-31 08:43:04 UTC
changeset:   65307:8f1827575a0f
tag:         tip
user:        padraigob@netbeans.org
date:        Thu Jan 31 08:38:12 2008 +0000
files:       mercurial/src/org/netbeans/modules/mercurial/HgModuleConfig.java
mercurial/src/org/netbeans/modules/mercurial/options/Bundle.properties
mercurial/src/org/netbeans/modules/mercurial/options/HgExtProperties.java
mercurial/src/org/netbeans/modules/mercurial/options/MercurialOptionsPanelController.java
mercurial/src/org/netbeans/modules/mercurial/options/PropertiesPanel.form
mercurial/src/org/netbeans/modules/mercurial/options/PropertiesPanel.java
mercurial/src/org/netbeans/modules/mercurial/options/PropertiesTable.java
mercurial/src/org/netbeans/modules/mercurial/options/PropertiesTableModel.java
mercurial/src/org/netbeans/modules/mercurial/ui/properties/Bundle.properties
mercurial/src/org/netbeans/modules/mercurial/ui/properties/HgProperties.java
mercurial/src/org/netbeans/modules/mercurial/ui/properties/PropertiesAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/properties/PropertiesPanel.form
mercurial/src/org/netbeans/modules/mercurial/ui/properties/PropertiesPanel.java
mercurial/src/org/netbeans/modules/mercurial/ui/properties/PropertiesTable.java
description:
125700: Use new dialog for mercurial properties


Comment 15 Patrick Keegan 2008-01-31 18:48:09 UTC
This is much better. Leaving as fixed, but the UI is still a little weird - there is no visual feedback showing that a
given row is selected. This might be confusing for some people.

Will verify after Jano reviews and/or some visual feedback is added
Comment 16 John Rice 2008-01-31 20:10:48 UTC
The lack of visual feedback when a row is selected is a bug, so I'll reopen the issue.

The row should be highlighted when a user clicks on it and when the dialog comes up initially the top row should be
selected by default and its value displayed in the Property Value text entry field. This gives users immediate feedback
as to how they are meant to interact with the dialog.
Comment 17 Padraig Obriain 2008-02-01 08:08:35 UTC
Created attachment 55889 [details]
additional patch
Comment 18 Padraig Obriain 2008-02-01 08:10:49 UTC
I am not sure what happened. I was aware of the problem of the selected row not being highlighted and had figured out
the fix and yet I omitted it from the original commit.

changeset:   65469:13ff018d07e4
tag:         tip
user:        padraigob@netbeans.org
date:        Fri Feb 01 08:03:58 2008 +0000
files:       mercurial/src/org/netbeans/modules/mercurial/ui/properties/HgProperties.java
description:
125700: Make sure selected row is highlighted