Description of problem:
When creating a new cluster if the user forgets something that is required on the first page (The one with Name, CPU Name, etc.) like the CPU Name, then navigates to another page of the dialog like for example the Console settings, then clicks OK. Nothing visible will happen. The dialog will just do nothing. Only when checking the pages of the dialog one by one will the user see that there is a red framed field requiring action.
Version-Release number of selected component (if applicable):3.4 beta
How reproducible: 100%
Steps to Reproduce:
1. Open New Cluster Dialog
2. Fill in Name but leave "CPU Name" empty
3. Go to the Console part of the "New Cluster" dialog.
4. Press OK.
Actual results: Nothing visible happens.
Expected results:The user is taken to the dialog where the missing required field should be filled (and is correctly marked in red). If there is more than a required field missing in more than a section, I guess it could just go by section order.
- there might be multiple sections within the dialog that contain validation errors - need to "jump" to the first section that contains a validation error (unless the currently-selected section already contains a validation error - in that case, need to stay in the currently-selected section).
- this applies to all dialogs that have side-sections, not only New Cluster.
-> changing BZ subject accordingly.
or highlight in red the pane which has the error in it.
(In reply to Itamar Heim from comment #2)
> or highlight in red the pane which has the error in it.
This seems to be the easiest thing to do, highlighting pane(s) which contain input validation errors.
Created attachment 887256 [details]
screen-cast: red highlight of dialog section with validation errors
(In reply to vszocs from comment #3)
> (In reply to Itamar Heim from comment #2)
> > or highlight in red the pane which has the error in it.
> This seems to be the easiest thing to do, highlighting pane(s) which contain
> input validation errors.
- we already have that, at least for some of the dialogs. see attachment 887256 [details].
as far as I could see, we have that for New VM and New Host, and we don't have it for New Cluster and New Network, so it needs to be added there.
[if we have additional dialogs with sections, they need to be checked and fixed as well, if needed]
- I still think that it is a better user experience if *in addition* to the section highlighting, the problematic section (or the first problematic section, if there are several problematic sections) will be selected after clicking on 'OK' in the dialog.
There are a few more dialogs with multiple sections and as far I could tell they all high-lighted the missing section. I will see what I can do about automatically selecting the correct tab and field.
Since there's a (UiCommon) model behind each dialog, validation is done by the model and dialog's UI code needs to hook to validation results via event listeners.
For example, in "New Host" dialog, when there's validation error on "General" side-tab, HostModel fires "IsGeneralTabValid" property change event. There is currently no automated way (other than custom property change events) to trigger dialog side-tab "invalid" feedback.
I think we should refactor models, removing all "IsGeneralTabValid" (or similar) and replacing them with single, consistent property change event like "TabValidationChange". This way, dialog UI *infra* code can listen to "TabValidationChange", do some tabName(string) -> tabObject(widget) resolution (based on API provided by infra) and update side-tab "invalid" feedback in a generic way.
As for automatically switching into first side-tab that has validation errors, if we do refactor mentioned above, it won't be too hard to do in a generic way. Otherwise, we will need more custom property change events in models, which is not a good approach IMHO.
Alexander - MODIFIED?
Verified on 3.6.0-0.0.master.20150804111407.git122a3a0.el6
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.