Hi I am not sure what you mean by "check the text element itself " etc. There are 4 text elements stacked up vertically inside a Group inside a FocusGroup.
Text Element 3 from the top is invisible on load and is only revealed if the user has a specific role.
The Group holding the 4 text elements together has the option to collapse.
Text Elements do not have that option and nor do FocusGroup (if there is I see it not).
There are no new lines or hidden spaces I can see and no other objects that those mentioned here above:
Did you activate the “Shrink when text get shorter” checkbox?
This is the first option
The second one is to put each of your text into their own group and put the condition on the Group instead of the text. Set it to collapse when hidden.
Like a page, you don’t collapse the page… you collapse element inside and this update the page height. The Focus group will do the same and adapt to the content.
Inside the text element in the rich text editor, you might have hidden spaces. Happened to me so many times ;( If that’s not the case like you said then we’ll need to dig some more
You can’t collapse ‘text’ elements’ height when they’re not visible, only groups.
So you need to put each text element inside its own group, and have that group set to collapse height when not visible:
For example, in the image below of a focusgroup menu, each group is a different colour (so you can see each group separately) and the text element is within the group:
Then, when using conditionals to hide individual groups, when they are not visible they collapse and the menu items below will shift up and take their place: