Studio UIGridLayouts Fail to Reflect Changes Made from Children

UIGridLayouts in Studio fail to reflect changes made by children, regardless of class. In the example provided, the bug is that UIGridLayouts do not immediately modify the aspect ratio of children according to the UIAspectRatioConstraint when it is put under UIGridLayout. In order to force the UIGridLayout to cause a change, the UIGridLayout must be parented elsewhere and parented back to where it was prior to reflect properly.

Steps to reproduce:

  1. Place the UIAspectRatioConstraint under the UIGridLayout
  2. Observe no change
  3. Move the UIGridLayout to somewhere other than the Frame it is under
  4. Move the UIGridLayout back under the Frame
  5. Observe the difference
  6. Move the UIAspectRatioConstraint out of the UIGridLayout
  7. Observe no change

ui-grid-layout-does-not-reflect-changes-in-children-dot-rbxl.rbxl (56.5 KB)

Expected behavior

When I put a child under a UIGridLayout, the UIGridLayout should immediately reflect the behavior of that child as it is allowed to affect the UIGridLayout’s siblings. In the example provided, this would mean the UIAspectRatioConstraint should immediately cause the children of the Frame under ScreenGui to become square.

3 Likes

This is just an acknowledgment announcement!

We’ve filed a ticket into our internal database for this issue, and will come back as soon as we have updates!

Thanks for flagging!

1 Like

Hi @hello42 we’re currently working on a fix and we should have one out soon. Thanks for reporting this again!

1 Like

Hi @theburgerkingbuilder, a few things:

First, thank you for working to help resolve older reports like this - it means a lot. Secondly, nice username.

Pleasantries aside, I know this isn’t the right avenue for this kind of request, but I’d like to ask if there’s any possibility for UIListLayouts to also respect UIAspectRatioConstraints and impose their AspectRatio to a UIListLayout’s siblings?

I don’t expect you to have the entire context of the feature’s behavior/history, but when the behavior is the case for UIGridLayouts, I can’t imagine the question wasn’t also posed for UIListLayouts. If it’s not possible - that’s okay, I’m more curious than anything.

Once again, thanks for your help resolving this.

Hey @hello42, I appreciate the complement! As for supporting UIConstraints under a UIListLayout, unfortunately, we don’t have plans to support this feature in the near future. This is mainly a concern of it being a low priority feature in our large backlog of work.

A potential work around for applying a AspectRatioConstraint for all elements that are siblings to a ListLayout could be to utilize Styling. For example, you can create a unique tag that helps identify our parent frame, and then set a StyleRule for all direct children of that frame that match the class GuiObject (which should encompass most UI instance types). We can give these children a Pseudo UIAspectRatioConstraint with our own AspectRatio, AspectType, and/or DominantAxis, In essence, this gives each GuiObject we place under the parent the same UIAspectRatioConstraint as a child.

This is what the StyleRule would look like in the StyleEditor

In the Explorer tab say we had the following hierarchy

We would see the following in our studio view

1 Like