SkeletonUI icon indicating copy to clipboard operation
SkeletonUI copied to clipboard

Add padding to multiline modifier

Open officebluesource opened this issue 3 years ago • 0 comments

Goals :soccer:

SkeletonUI uses GeometryReader to read the views size. GeometryReader is greedy and tacks all the size it gets. If I have a typical Layout like: HStack { Text("a") VStack { Text("a") Text("a") }.skeleton(true).multiline(...) }

This causes VStack to take the complete height of the container. Also the multiline is "blown" up. You can work around by applying extra constraints when the skeleton is there, but that increases the complexity of the layout a lout.

A simple solution is to add a padding option to the multiline modifier, this enables more flexibility when adding the skeleton.

Testing Details :mag:

Added a new snapshot testtestCustomTextWithPadding

officebluesource avatar Jun 14 '21 19:06 officebluesource