ExpandableArea widget seems to lack full support for Slate EnableGlobalInvalidation

The repro pretty much says it all. Encountered the issue with `Slate.EnableGlobalInvalidation=1` in UE 5.4.

Worked around the issue by adding a RegisterActiveTimer in SExpandableArea::SetExpanded_Animated which does BodyBorder->Invalidate(EInvalidateWidgetReason::Layout); until the anim has finished.

Steps to Reproduce
Set Slate.EnableGlobalInvalidation=1 for the project.

Have an SExpandableArea in some UI (use UExpandableArea if needed) that contains some widgets in the Body.

Run PIE with “in a new window” option (or run a cooked build). Important because the Editor window doesn respect globalinvalidation in the same way.

Toggle the expandable area expansion.

Observe that the Body contents appear and disappear, but the size occupied by the expandable area, does not change.

Expected the area occupied by Expandable Area to change.

You can also then run `Slate.TriggerInvalidate` in the console and see the area update.

Hi Edmund,

I don’t see any issues with work workaround, though I haven’t been able to reproduce this issue myself. I’m using a UExpandableArea with Header/Body contents in a vertical box with some other elements (to confirm it’s reporting it’s size correctly), and I see layout invalidations as the animation plays. It looks like the expanding animation drives the DesiredSizeScale property of the border, which is bound to trigger a layout invalidation in SBorder:

SLATE_ADD_MEMBER_ATTRIBUTE_DEFINITION_WITH_NAME(AttributeInitializer, "DesiredSizeScale", DesiredSizeScaleAttribute, EInvalidateWidgetReason::Layout);I’ve tested on 5.5 and main, I’ll pull a 5.4 build to verify as well but I don’t see any relevant code changes between those versions. Let me know if there’s something else I should try to repro this, if we’re able to reproduce it in main then I’ll see about getting a fix in so that your workaround isn’t necessary.

Best,

Cody

Hi,

It looks like this does reproduce in 5.4 and was fixed in 5.5, though I haven’t tracked down a specific change that is related so it may be a side effect of some other change. If you plan to upgrade at some point, you could stick with your workaround and flag it to be removed once you take 5.5. Otherwise, if you need a proper fix for 5.4 then let us know and I can dig into it more to try and track down a fix to backport.

Best,

Cody

Thanks for checking. I’m not sure if this would be relevant to the repro but we were using it in a relatively complicated setup where i had a list of expandable areas inside a listview , each of which themselved held a listview in the body. I am unsure if that would contribute to the repro.

In our setup, I was not seeing the BodyBorder’s DesiredSizeScale being re-calculated via the call to SExpandableArea::GetSectionScale.

I _was_ seeing re-calculation of Visibility which was bound to SExpandableArea::OnGetContentVisibility , but not DesiredSizeScale…

If you dont see the issue in 5.4 either, i will try to see if i can make a more standalone repro.

Thats probably all we need to hear! Knowing we can pull our workaround in 5.5 is enough for me!

Thank you so much for confirming this.