Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15572 closed defect (fixed)

Css theme: display warning on all valid* fields even if is valid

Reported by: Mathevet julien Owned by: Douglas Hays
Priority: undecided Milestone: 1.8
Component: Dijit - Form Version: 1.8.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

In dialog box, if there is one non valid fields, all other valid* fields display a warning img.

This is true for all non claro theme.

See patch of test file to see bug. Enter a non valid date in first dialog.

Attachments (3)

testDijitErrorinDialog.diff (1.5 KB) - added by Mathevet julien 7 years ago.
patchNihilo.diff (560 bytes) - added by Mathevet julien 7 years ago.
15572.patch (12.4 KB) - added by Douglas Hays 7 years ago.
possible fix

Download all attachments as: .zip

Change History (16)

Changed 7 years ago by Mathevet julien

Attachment: testDijitErrorinDialog.diff added

comment:1 Changed 7 years ago by Mathevet julien

This is due to dijitError set on dialog. In claro there are other class that override it.

Changed 7 years ago by Mathevet julien

Attachment: patchNihilo.diff added

comment:2 Changed 7 years ago by Mathevet julien

I submit nihilo exemple fix. But is different of Claro.

I remark also that validation input in claro seem reduce due to a large validationContainer... seem a different bug

comment:3 Changed 7 years ago by bill

I'll take a look but I'm confused by your test file. It only has one ValidationTextBox, so how could it demonstrate a problem with multiple warning images? Aren't you saying that multiple ValidationTextBoxes all suddenly become marked as invalid?

comment:4 Changed 7 years ago by bill

Milestone: tbd1.8
Status: newassigned

Oh I see, typing an invalid date in the DateTextBox makes the ValidationTextBox also display an error.

The dijitError class is showing up on Dialog since Dialog extends _FormWidget (see [9768]), and also _CssStateMixin. It seems a bit strange for a Dialog itself to be marked as an error, but I guess it's not a problem per se. I'll fix the CSS like you suggested.

Last edited 7 years ago by bill (previous) (diff)

comment:5 Changed 7 years ago by bill

Component: DijitDijit - Form
Owner: changed from bill to Douglas Hays

Actually Doug, probably you should take this one. The dijitError class is used in all the themes except claro, and it appears in dijit.css itself. I guess it's just a question of using dijitTextBoxError and dijitSelectError instead.

Alternately you could argue that the dijitError class shouldn't be getting applied to any container classes like Dialog, but it seems fragile to depend on that.

Changed 7 years ago by Douglas Hays

Attachment: 15572.patch added

possible fix

comment:6 Changed 7 years ago by Douglas Hays

Please review the attached patch. I proliferated the dijitValidationTextBox class name so that CSS could be inherited without having to duplicate rules (especially by custom widgets). This class was already being added to plain ValidationTextBox widgets but none of the subclasses which seemed wrong.

comment:7 Changed 7 years ago by bill

I'm just a bit confused. I applied your patch, and tried DateTextBox: it seems to display an error fine, but it doesn't have the dijitValidationTextBox class on it.

PS: ignore this comment, I was testing against the wrong source tree, without your patch applied.

Last edited 7 years ago by bill (previous) (diff)

comment:8 Changed 7 years ago by Mathevet julien

Another thing also: With claro theme with my patch for test file, when you enter a non valid date the content of validationTextBox is reduce: reduce to 4 letters. Then if you set a valid date other letters appears.

Seem the dijitValidationIcon is too large or something ike that

Last edited 7 years ago by Mathevet julien (previous) (diff)

comment:9 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [29077]:

Fixes #15572. Add dijitValidationTextBox class to all ValidationTextBox? subclass widgets (and Select) to allow for CSS inheritance of validation CSS rules.

comment:10 Changed 7 years ago by bill

Resolution: fixed
Status: closedreopened

Thanks for the fix. I'm seeing errors in tests/form/robot/Select.html now though (tested on IE8), starting with [29077].

comment:11 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

In [29093]:

Fixes #15572. SelectedOption? suffix class assumed a single baseClass. !strict

comment:12 Changed 7 years ago by bill

In [29154]:

this is the actual output generated from less (as run via compile.sh), refs #15572.

comment:13 Changed 7 years ago by Douglas Hays

#15664 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.