automotive-design-compose icon indicating copy to clipboard operation
automotive-design-compose copied to clipboard

Fix component replacement with a composable that has layout and DesignCompose children

Open rylin8 opened this issue 1 year ago • 1 comments

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.

rylin8 avatar Mar 27 '24 21:03 rylin8

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.

rylin8 avatar Mar 28 '24 21:03 rylin8

This issue should be addressed by squoosh, which has a better integration between DesignCompose layout and regular Compose layout.

iamralpht avatar Oct 30 '24 15:10 iamralpht

This is done in squoosh

rylin8 avatar Dec 12 '24 05:12 rylin8