automotive-design-compose
automotive-design-compose copied to clipboard
Fix component replacement with a composable that has layout and DesignCompose children
When performing a component replacement on a node with a composable that has layout such as Row() or Column(), and the children of the Row() or Column() are DesignCompose generated composables, those children have the wrong layout. The children take the LocalCompositionParentLayout info from the replacement node, causing them all to resize to the size of that node.
Unfortunately we currently don't have a good solution to this, but will work on a fix in a future release. The problem is that DesignCompose calculates layout for all nodes, and replacing a component with a custom composable that does its own layout such as a Row or Column will conflict with the DesignCompose calculated layout. We support Row and Column custom content using our list widget.
This issue should be addressed by squoosh, which has a better integration between DesignCompose layout and regular Compose layout.
This is done in squoosh