ICEfaces
  1. ICEfaces
  2. ICE-7341

ace:dialog sizing based on content

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 3.0.RC1, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Tomcat 7.0.12
    • Assignee Priority:
      P2

      Description

      Currently the ace:dialog component has a default width of 300 px. Ideally, the dialog should size the height/width based on the dialog content.

        Activity

        Hide
        yip.ng added a comment - - edited

        This may not be simple or even possible. The width is a number because it is used in all kinds of calculations and situations in the plugin: resizing, positioning, effects, dragging, comparing with minWidth, etc. Allowing "auto" and other units (e.g. in, em, %) may affect a lot of things.

        Also, a width of "auto" or other units may not do what you expect across browsers and layouts, especially for an absolute-positioned element that can move around. E.g. in a CSS reference book there's almost half a page explaining the intricacies of "auto". And % is a % of "containing block," (not always the parent) which is again highly inconsistent across browsers and layouts.

        Add to this that a jQuery dialog can potentially be detached and re-attached to anywhere else in the DOM tree, making "auto" and other units even more unpredictable.

        And, if allowing "auto" and other units were not that complicated, the original author would have done it already.

        Show
        yip.ng added a comment - - edited This may not be simple or even possible. The width is a number because it is used in all kinds of calculations and situations in the plugin: resizing, positioning, effects, dragging, comparing with minWidth, etc. Allowing "auto" and other units (e.g. in, em, %) may affect a lot of things. Also, a width of "auto" or other units may not do what you expect across browsers and layouts, especially for an absolute-positioned element that can move around. E.g. in a CSS reference book there's almost half a page explaining the intricacies of "auto". And % is a % of "containing block," (not always the parent) which is again highly inconsistent across browsers and layouts. Add to this that a jQuery dialog can potentially be detached and re-attached to anywhere else in the DOM tree, making "auto" and other units even more unpredictable. And, if allowing "auto" and other units were not that complicated, the original author would have done it already.
        Show
        Ken Fyten added a comment - FYI: http://stackoverflow.com/questions/2231446/automatically-resize-jquery-ui-dialog-to-the-width-of-the-content-loaded-by-ajax
        Hide
        yip.ng added a comment - - edited

        Set width to auto as suggested above. (Not much of a fix. He just said set resizable to false and width to auto and it works for him.) Immediate problems:

        1. See screenshot-01.png.
        2. See screenshot-02.png. (I have shown this side effect more than once in the past.)
        3. Effects don't look right either in IE. See video at http://screencast.com/t/d5mPTOz4BRRs.

        Suggested fix, like most any user-suggested fix we have seen in the past, only works for the user's case. They never think much about working across all browsers and layouts.

        Show
        yip.ng added a comment - - edited Set width to auto as suggested above. (Not much of a fix. He just said set resizable to false and width to auto and it works for him.) Immediate problems: 1. See screenshot-01.png. 2. See screenshot-02.png. (I have shown this side effect more than once in the past.) 3. Effects don't look right either in IE. See video at http://screencast.com/t/d5mPTOz4BRRs . Suggested fix, like most any user-suggested fix we have seen in the past, only works for the user's case. They never think much about working across all browsers and layouts.
        Hide
        Ken Fyten added a comment -

        Need to test IE8, IE9 to see if the IE issues are IE7 specific or not. Should also test Chrome as well.

        If issue #2 and #3 are IE7 specific, create a new JIRA to document the limitations with IE7 for now and we'll make them known issues. You should note in the TLD docs the limitations with AUTO combined with resizable, and also IE7.

        Show
        Ken Fyten added a comment - Need to test IE8, IE9 to see if the IE issues are IE7 specific or not. Should also test Chrome as well. If issue #2 and #3 are IE7 specific, create a new JIRA to document the limitations with IE7 for now and we'll make them known issues. You should note in the TLD docs the limitations with AUTO combined with resizable, and also IE7.
        Hide
        yip.ng added a comment - - edited

        Issue #2 and #3 are IE7 specific. Not in FF, Chrome, Safari, IE8, IE9.
        New JIRA: ICE-7457. See also ICE-7400.
        TLD docs updated.

        Revision: 26297


        Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/resources/icefaces.ace/dialog/dialog.js
        Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/resources/icefaces.ace/jquery/ui/jquery-ui.css
        Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/src/org/icefaces/ace/component/dialog/DialogMeta.java
        Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/src/org/icefaces/ace/component/dialog/DialogRenderer.java

        Show
        yip.ng added a comment - - edited Issue #2 and #3 are IE7 specific. Not in FF, Chrome, Safari, IE8, IE9. New JIRA: ICE-7457 . See also ICE-7400 . TLD docs updated. Revision: 26297 Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/resources/icefaces.ace/dialog/dialog.js Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/resources/icefaces.ace/jquery/ui/jquery-ui.css Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/src/org/icefaces/ace/component/dialog/DialogMeta.java Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/src/org/icefaces/ace/component/dialog/DialogRenderer.java
        Hide
        yip.ng added a comment -
        Show
        yip.ng added a comment - ICE-7610 .

          People

          • Assignee:
            yip.ng
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: