-
Notifications
You must be signed in to change notification settings - Fork 141
Description
In the current draft, there is a layout
callback function in LayoutClass
, which returns LayoutResult
includes minContent
and maxContent
as well as width
and height
.
I don't think this setting makes much sense. I believe the minContent
and maxContent
are values used by parent to decide a proper inline-axis length of its child. If the width
and height
has been decided by the child, having minContent
and maxContent
doesn't give the parent something really useful.
I'd suggest we have an additional measure
callback, which takes the same parameters as the current layout
, and returns a struct only includes minContent
and maxContent
. Then its parent decides geometry for the the box and calls layout
with something like "suggested size". The Box
interface would need to be adjusted accordingly as well.
I believe this is basically how Android's layout process work.