https://kotlinlang.org logo
#compose
Title
# compose
i

Ian Warwick

02/22/2020, 11:46 PM
Is
Box
new? did not see that before, wondering in what way its different to
Container
they seem to be quite similar. I see one difference is Container can only have one child however
Box
is then also quite similar to
Stack
as well I guess 🤔
l

Leland Richardson [G]

02/23/2020, 12:04 AM
Box will replace Container
☝️ 4
a

Adam Powell

02/23/2020, 12:43 AM
The idea so far is to play around with a "standard" modifier set for some common usages and see what happens, feedback welcome
Of particular note should be how the layout constraints propagate, specifically around min constraints from the parent. We've had some debate around how that should behave in Box vs. Row/Column/Stack
Looking to play around with some different ideas, see what people find most useful, then pare down the total set to simplify
c

codeslubber

02/23/2020, 2:14 AM
2 cents; good thing to work on, constraints in layout-based systems eventually suffer from that ‘config is simple, just make sure the values in these 50 different spots all agree with each other’ syndrome… question is whether constraint propagation and logic should be intermingled, but not sure what you can do about that…
a

Adam Powell

02/23/2020, 2:16 AM
Can you elaborate a bit around what you're referring to around constraint propagation and logic intermingling?
c

codeslubber

02/23/2020, 3:28 AM
What I am saying is a declarative representation of constraint propagation, per what is shown here, does solve a huge problem with layout systems. Most people who used AutoLayout on ios love it at first, then end up despising it. Generally because they eventually find themselves trapped down in a dark pit trying to get something to satisfy a lot of different constraints expressed in different places in a Storyboard. (Some people push through that and become wizards and still love AL, but I think most don’t.)
the only thing I am mentioning that is worth questioning is whether constraint propagation and viewlogic should be mixed, so great I am seeing how centering is cascading down to these 3 children, but I was here to find out what happens when a click event comes through… this was the dream (largely unrealized) of CSS, no? that little tags would let you layer in constraints and styles and even behaviors without requiring code changes. The failure of that dream was pretty much not even mentioned when React came out, but there was a lot of talk about it in various corners.
one argument would be that the top view layer should most contain components, so THEY are kind of the tags, and thus that top layer is situational (capturing the propagations, etc.) and the behavior is down inside those components, I like that answer… ?