# compose


11/03/2023, 7:18 AM
Just curious - were the default
for rows and columns chosen based on some user statistics? In my experience, I have to change them to center maybe 90% of the times. SwiftUI got many things wrong but I really like they center everything by default.

Stylianos Gakis

11/03/2023, 12:45 PM
This is me just speculating and sharing my interpretation of both these frameworks, but I feel like in SwiftUI you get a lot of “try to be nice by default” when you don’t tinker with things. Which sometimes gets annoying, but they are trying to make it more pretty if you configure nothing. With Compose, it’s always been you get the barebones by default, and if you want something more special, just specify it. This then applies perfectly in this specific scenario. In my mind, the default of a row should in fact be that items are aligned to the beginning. In the exact same way that if I add a text field and I add some text, it will start painting the text on the top left, and not at the center. This “nothing special by default” approach is quite nice tbh. And I feel like that’s how this decision for the defaults there was made.


11/03/2023, 1:06 PM
I personally don’t feel like TopStart is any more ‘natural’ than Center to be honest. Not that debating it makes any sense, as this stuff is now written in stone 😄 but I hope someone from the team will jump in. Cause if my 90% rate applies to other people’s projects too, then I really wish a more dev friendly, pragmatic approach was taken. I mean, top alignment for Row is so useless I can’t recall a single time I actually used it.


11/03/2023, 7:28 PM
maybe it depends on your designs, but I actually can't find anywhere in our codebase where we change arrangement and alignment on Column, and only a few on Row
so for us, >90% of the time TopStart is either correct or it doesn't matter

Loney Chou

11/04/2023, 12:37 AM
Center is dangerous if you are in a scrollable container.