self-hiding-child-cannot-hide-its-slot
Installation
SKILL.md
A self-hiding child cannot hide its slot
Optional controls commonly hide themselves: no platform support, no permission, nothing to connect to — render nothing. That is correct and it is not enough. A caller that gave the control a container, a weight or a divider still draws all three around an empty box.
The component's own contract has to say so, in the same file that declares it:
// adapted
/**
* Whether [OptionalControl] would render anything. Layouts that give it a container of its own
* must hide the container too when this is false — the control hides itself, but it cannot hide
* a wrapper it does not own.
*/
expect fun isOptionalControlAvailable(): Boolean