UIListLayout uses space even for invisible GUI elements

Up until a week or so ago, I had a UIListLayout with 3 items.

[A] [B] [C]

When I set A.Visible = false, B and C moved to the left. A recent Roblox update has caused this to stop happening. Now, A is invisible but takes up space regardless.

What I see:
SPACE [B] [C]
What I expect:
[B] [C]

5 Likes

I’m not able to reproduce this behavior in a simple test place. I did encounter similar behavior a few days ago though, but it was easy to fix.

Have you tried calling UIListLayout:ApplyLayout() after setting A.Visible = false ?

Do you have a repro? It doesn’t seem to simply occur in all cases, because I opened up production studio and was unable to reproduce either of the bugs I’ve been seeing (Visible changes not updating the list layout, AbsoluteSize changes not updating the list layout).

Already sent it to Tiffblocks, but here is my minimal repro:

Open this place and run this in command line to toggle button visibility
a = game.StarterGui:FindFirstChild("$CancelButton",true) a.Visible = not a.Visible

MinimalRepro.rbxl (15.6 KB)

Here is what I see when I do that:

2 Likes

I have a fix that should hopefully fix this issue, I’ll say when I turn it on.

I believe this is the same as the bug where UIListLayout wasn’t hooking up to Changed events properly. It should be fixed now.