Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-7907

Investigate to recalculate grid on resize/expand

    XMLWordPrintable

Details

    • Spike
    • Resolution: Done
    • Neutral
    • None
    • None
    • None
    • Nucleus 32
    • 5

    Description

      When the Actionbar is collapse for the first time, the ContentViews that contains the Grid, is expanded as expected, but the Grid's width is not recalculate, but keep the same value as before expanded

      The reason is, the LayoutManager didn't add the GridConnector to ManagedLayout (layout should be measure in need), and hence the Grid's width was not recalculated as well

      But after expand the Actionbar, the LayoutManager adds GridConnector to the list ManagedLayout, so from now on, for every change to layout, the grid will be recalculated.

      This could be a bug of vaadin when the grid doesn't work well with expandable layout.

      What to do

      Try these 2 approaches

      1. Find a proper way to add the GridConnector to LayoutManager com.vaadin.client.LayoutManager#setNeedsHorizontalLayout. This approach requires the understanding of how LayoutManager work.
        pros and cons: cannot prove whether it works
      2. Using Rpc to send an event from ActionbarConnector to tell UI repaints the workbench after the Actionbar is collapsed (e.g using workbench.markAsDirtyRecursive())
        • pros: fix the problem
        • cons: not ensure the performance if the workbench has too many component

      Attachments

        Issue Links

          Activity

            People

              thien.quach Quach Hao Thien
              ajones Adam Jones
              Nucleus
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Work Started:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1.75d
                  1.75d