Why aren't text transformations (such as all-caps)...
# compose
d
Why aren't text transformations (such as all-caps) part of
TextStyle
? Most designers see those as part of the text styling but in compose we are forced to handle them via code. Is there any plan to include text transformations in text style so that we can manage them in themes? In some project I created my own Text widgets to add this behavior, but I think it should be part of Compose handling of Texts.
s
One reason was they create problems for selection, editing etc when uppercase version is different than lowercase. There were a few more but it is safer to call string.toUpperCase
I am not a language expert but 'SS' in german was one of the common exanples
It doesn't mean we wont add (i dont have an opinion if we will or we will not) but it was more reliable for everybody for api user to call to upper case for now.
d
I still think it can be done by calling upper case, I just think it should be part of the
TextStyle
It should be possible to use it in the theme
s
Please create a ticket 👍
d
I will and link it here :-)
s
Sure. Meanwhile you should be able to have a custom theme attribute, and apply via VisualTransformation (hmm this is for editing). For text (or editin) toUppercase
d
That's a good point. VisualTransformation would make more sense for a styling attribute
(sorry messed up the formatting in the issue)