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:
Place the UIAspectRatioConstraint under the UIGridLayout
Observe no change
Move the UIGridLayout to somewhere other than the Frame it is under
Move the UIGridLayout back under the Frame
Observe the difference
Move the UIAspectRatioConstraint out of the UIGridLayout
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.
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.
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