Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Changes in rendering of fieldErrors in DynamicForm after updating

    Trying to update from v11.0p_2016-08-13 to v11.0p_2017-02-09

    The context of the update is to get Chrome support back in our product as efficiently as possible.

    The columns in the table are no longer built the same way and causes unnecessary wrapping.

    Feels like the table column reserved to the icon now hosts the icon and the message and the space reserved for the message is now empty.

    Code:
            var form = isc.DynamicForm.create({
                showErrorText : true,
                showErrorIcons : true,
                numCols : 1,
                width : 300,
                fields : [{
                    name : 'message',
                    editorType : 'StaticTextItem',
                    errorIconSrc : 'feedback/error.png',
                    showTitle : false
                }]
            });
            
            form.addFieldErrors('message', 'Please select at least one item in the below list', true);
            
            form.show();

    #2
    When an item renders, the "text box" (the area that contains the item value) is rendered out at a size determined by the 'width' property of the item. Some additional space is also reserved for the error icon and the error message.
    This is configurable - see the formItem.errorMessageWidth property.
    In this particular chunk of code, the item has no value, (and by default the text box of a StaticTextItem has no distinctive styling to indicate how large it is), so it looks like there is just blank space next to the error message.

    The default errorMessageWidth is 80, which is what we're seeing here. Increasing this will cause the error text to take up additional space.

    Alternatively, if you truly want an item containing just the error text, you can set the value of the item to the error string, or you could consider experimenting with DynamicForm.showInlineErrors being set to false.

    As an aside: This used to behave differently due to the fact that StaticTextItem did not have an explicit width defined by default (the default width was null rather than "*"). This setting is not fully supported and led to some other problems around clipping behavior for StaticTextItems with clipValue set to true, which prompted the change of supplying an explicit width to StaticTextItems by default.

    Regards
    Isomorphic Software

    Comment


      #3
      Thank you for your answer - we'll look at updating how we handle these fields when we next update !

      I'm wondering - what is SmartClient's strategy regarding the nightly updates ? I'm used to nightly releases on a release branch to contain only bug/stability fixes, leaving all behavioral changes for the next version (minor or major).

      I expected to be able to update within a few months of a release with minor testing, but my attempt at upgrading seems to indicate that we would need to plan a "minor" update as thoroughly as I would need to plan a "major" update - with full manual regression testing.

      The main reason for us wanting to update rapidly after our last update was to get the fixes regarding issues with Chrome (which we ended up fixing manually to avoid triggering a new testing cycle).

      Are new features or behavior changes like this intended to be in the nightly release ? I'd just like to know so we can plan future updates better.

      Regards,
      --
      Eric

      Comment


        #4
        This was a bug fix - for the clipping issue we mentioned. Sometimes fixing a bug necessitates a behavior change in an obscure case like this.

        For more general information about nightlies, see Smartclient.com/builds.

        Comment

        Working...
        X