Inspectorelement - Broken Layout

I’m trying to write a simple window replacement for default inspector for the time being until whole inspector is using UIElements. I have following code:

var root = this.GetRootVisualContainer();
            root.Clear();

            if (Selection.activeGameObject != null)
            {
                var allComponents = Selection.activeGameObject.GetComponents<Component>();

                for (int i = 0; i < allComponents.Length; i++)
                {
                    Label lbl = new Label(allComponents[i].GetType().Name);
                    lbl.style.fontStyleAndWeight = FontStyle.Bold;
                    lbl.style.borderLeftWidth = 2;
                    lbl.style.borderRightWidth = 2;
                    lbl.style.borderTopWidth = 2;
                    lbl.style.borderBottomWidth = 2;
                    lbl.style.borderColor = Color.black;
                    root.Add(lbl);

                    InspectorElement inspector = new InspectorElement(allComponents[i]);
                    root.Add(inspector);
                }
            }

The layout of controls generated by this code looks a follows:

As outlined is the inspector element. We can clearly see that is has flex-grow set to 1. If I set this parameter to 0 via code or using the Debuger I end up with this:
4421941--403294--upload_2019-4-12_17-2-41.png

This is incorrect, as according to the flex box specification, container should take at least the height of it’s children.

Is this know issue? (Unity 2018.3.9f)

Hello, could you please log a bug with a repro project? We may want to look at how Yoga (layout engine) conforms to the flex box specification

Hello, this is the case link: 1145937 .

It does not looks like a yoga problem, but similar to good old float: left and clear: both problem in html - maybe InspectorElement is not recalculating it’s child controls layout in “proper” moment, after controls has been generated, so it ends up having initial height of 0.

I can confirm it works correctly now in 2019.1.0f2

Cheers!