![Stylianos Gakis Profile](https://pbs.twimg.com/profile_images/1651335951832997893/Cii-nBh1_x96.jpg)
Stylianos Gakis
@GakisStylianos
Followers
721
Following
17K
Statuses
4K
Android @hedviginsurance
Stockholm, Sweden
Joined December 2019
@oguzhandogd @halilozercan They do the same with "Greek style yoghurt". They go around PDO rules this way is what I think happens in those scenarios.
1
0
2
@Zhuinden @raamcosta Can I still see which order of modifiers makes that happen? I have been very curious from your original post up there.
0
0
3
@Zhuinden @raamcosta Btw I'd still like to see a repro of the 64% problem you mentioned here to understand what you mean.
@raamcosta @GakisStylianos You say it's reaching but you can lose a silly amount of time to the statefulness of various Modifier, for example Modifier.fillMaxSize(0.2) taking away 20% of the "current available space on this chain", while if you use Modifier.fillMaxSize(0.8) AFTER then it's actually 64%. 🤦
1
0
1
@Zhuinden @raamcosta Alright, I understand that it can be tricky to get initially. And custom layouts are also not something you get right on the first try. I just wonder from the explanation of fillMaxX right above here which part do you feel like is the unpredictable part?
@Zhuinden @raamcosta `fillMaxWidth(fraction)` for example makes the composable look at the incoming maxWidth, multiplies it with the fraction, ensures it is inside the constraints of `minWidth` too, and then it sets the min/max width constraints to that result. Which part is unexpected here?
1
0
1
@JimSproch I am still quite certain TextFieldState is more than just a "reference implementation". It has code in there that references the IME, the clipboard, hardware keyboards and other such factors. I am not sure if the alternative which does not use TextFieldState does the same.
1
0
0
@Zhuinden @raamcosta `fillMaxWidth(fraction)` for example makes the composable look at the incoming maxWidth, multiplies it with the fraction, ensures it is inside the constraints of `minWidth` too, and then it sets the min/max width constraints to that result. Which part is unexpected here?
1
0
1
@Zhuinden @raamcosta "Magic" regarding creating and destructing layouts is one thing. Predictable modifiers and a constraints system in which you can rely on is another thing. One does not have to affect the other.
0
0
0
@Zhuinden @raamcosta I don't know why you draw parallels between unrelated things like that. Modifiers especially due to the fact that they don't try to "merge" with other random modifiers in the chain are in fact very predictable. I still would recommend you read these docs
@Zhuinden @raamcosta That has nothing to do with any sort of "statefulness". I think you would do yourself a great favor taking a look at these docs to understand what constraints do. FillMaxSize multiplies the max incoming constraints by the fraction
0
0
1
@Zhuinden @raamcosta Also not sure what you mean by this 64%, do you have a repro of what you describe? I must be misunderstanding what you mean, because chaining a fillMaxSize after a fillMaxSize does nothing, as the min and max constraints are set to a fixed number from the first one.
1
0
1
@Zhuinden @raamcosta "in a supposed meaningful manner" meaningful to who? Would it be more meaningful than "modifier order matters"? Where you don't need any implicit knowledge other than reading the order in which modifiers are called? I don't understand, why do you want more magic rather than less?
1
0
0
@raamcosta @Zhuinden In fact, it's actually a bit hilarious that compared to your original post, where you suggested that one needed to know modifier "internals" to understand what is going on. It's in fact the opposite. Your "implicit" solution would require such knowledge, the current impl doesn't.
1
0
1