Sam
10/05/2020, 7:51 AMBsn Net
10/05/2020, 8:43 AMmatvei
10/05/2020, 10:15 AMFrameLayout
in android, ZStack in swiftui etc. We received some feedback that people expect Stack to be vertical, or even horizontal. People have different backgrounds and different expectation from that name. Overall we've decided that being 100% semantically correct is not worth it, and just having simple name for a simple concept will work just fine, hence Box
.
• We wanted to reduce number of APIs for general layouts. People used Box as a modifier wrapper or even as a leaf node with just modifiers on it. Sometimes they used Box to wrap many children as well. Name Box
can be both (layouts that overlays children AND thing that you apply modifiers), allowing us to reduce complexity be reducing amount of API for people to learn. Stack wasn't striking us as smth that would read nicely without children.
• We can concentrate on one thing performance wise and tune it nicely as we expect Box to be used quite regularly.
• it's shorter to type (2 chars saved! 😛 )Archie
10/05/2020, 11:06 AMBox
doesn't really feel like it states its purpose. I understand that it Stack
may mean VerticalStack
(Column) and/or HorizontalStack
(Row) but Box
seems even more confusing. I feel like naming it ZStack
like in SwiftUI
makes the purpose much more clear compared to naming it Box
.gildor
10/05/2020, 11:37 AMdoesn’t really feel like it states its purposebut there are different purposes for it
sindrenm
10/06/2020, 1:51 PMtypealias Stack = Box